-
Notifications
You must be signed in to change notification settings - Fork 300
(Partially) Stabilize AVX512-FP16 #1905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…ly use `f16` in the signature
f4950fd
to
28c6f48
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as far as what is getting stabilized here. This still requires the FCP at rust-lang/rust#127213.
I also changed the
feature
parameter for these stabilized functions to bestdarch_x86_avx512fp16
, as rustc doesn't allow a stable and unstable feature to have the same name
It would probably be best to rename the stdarch_x86_avx512fp16_2
or something like that rather than having the only difference be an underscore. But that can happen separately.
The other feature name is |
#[inline] | ||
#[target_feature(enable = "avx512fp16")] | ||
#[cfg_attr(test, assert_instr(vcvtsi2sh, ROUNDING = 8))] | ||
#[rustc_legacy_const_generics(2)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah IMO we should not be adding more uses of this attribute anywhere
Except for these 44 functions that explicitly use
f16
in the signature_mm{,256,512}_{set,set1,setr}_ph
_mm_set_sh
_mm{,256,512}_{load,loadu,store,storeu}_ph
_mm_{load,mask_load,maskz_load,store,mask_store}_sh
_mm{,256,512}_reduce_{add,mul,min,max}_ph
_mm{,256,512}_cvtsh_h
_mm{,256}_bcstnesh_ps
Tracking issue: rust-lang/rust#127213
I also changed the
feature
parameter for these stabilized functions to bestdarch_x86_avx512fp16
, as rustc doesn't allow a stable and unstable feature to have the same namecc @tgross35