rust-lang / stdarch

Rust's standard library vendor-specific APIs and run-time feature detection
https://doc.rust-lang.org/stable/core/arch/
Apache License 2.0
601 stars 267 forks source link

Implement AVX512_FP16 #1605

Closed sayantn closed 2 months ago

sayantn commented 3 months ago

This PR adds the AVX512_FP16 intrinsics in Rust. These intrinsics will be behind the feature gate #[feature(stdarch_x86_avx512_f16)] (rust-lang/rust#127213).

Progress:

This also adds some missing inlining in avx512ifma and updates the x86-intel.xml file to v3.6.9

The set1_pch intrinsics were not implemented due to a lack of complex number type. cmpph and fpclassph intrinsics use inline asm because of no i1 support yet.

rustbot commented 3 months ago

r? @Amanieu

rustbot has assigned @Amanieu. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

tgross35 commented 3 months ago

Have you run into any weird behavior with these, or do things seem to be working smoothly? (ignoring the ABI issue for system function calls, that is)

sayantn commented 3 months ago

No problems yet, just that simd_fabs doesn't accept a f16 argument, so i will just use an and operation. I am actively avoiding doing f16 operations in rust, but that's not a blocker for sure.

bors commented 3 months ago

:umbrella: The latest upstream changes (presumably 3dd9579da33db7fc9db68eb36969d387dd706517) made this pull request unmergeable. Please resolve the merge conflicts.

sayantn commented 2 months ago

cc @tgross35 @beetrees