Skip to content
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

Support Intel IceLake ISAs through target_feature #67329

Closed
elalfer opened this issue Dec 15, 2019 · 3 comments
Closed

Support Intel IceLake ISAs through target_feature #67329

elalfer opened this issue Dec 15, 2019 · 3 comments
Labels
A-SIMD Area: SIMD (Single Instruction Multiple Data) C-feature-request Category: A feature request, i.e: not implemented / a PR. O-x86_64 Target: x86-64 processors (like x86_64-*) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@elalfer
Copy link

elalfer commented Dec 15, 2019

Working on CPUID based dispatch for Vector AES code for https://crates.io/crates/crypto_pimitives library.

Based on https://doc.rust-lang.org/reference/attributes/codegen.html#x86-or-x86_64 Rust doesn't support any AVX512 targets.

@JohnTitor JohnTitor added the C-feature-request Category: A feature request, i.e: not implemented / a PR. label Jan 19, 2020
@jonas-schievink jonas-schievink added O-x86_64 Target: x86-64 processors (like x86_64-*) A-SIMD Area: SIMD (Single Instruction Multiple Data) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 6, 2020
@workingjubilee
Copy link
Member

workingjubilee commented Sep 18, 2020

The reference is outdated only concerned with stable here, there is partial AVX512 support in core::arch and the compiler on nightly, as can be seen here: https://doc.rust-lang.org/core/arch/x86_64/index.html

As there is quite a lot to support it has not been finished (nor stabilized) however: rust-lang/stdarch#310
So I believe it does not yet include the specifics of the AVX512 VAES extension you want, either.

@DevJPM
Copy link
Contributor

DevJPM commented Oct 18, 2020

I have looked into implementing this (for nightly at least over on rust-lang/stdarch) however it appears that support is blocked by the compiler not being willing to accept the VAES (and vaguely related VPCLMULQDQ) feature flags for enabling the relevant LLVM intrinsics. And I would be willing to make a PR for the compiler to add that flag, but I'm not sure if there's more to it than "just" adding the "vaes" string here and here. Though the feature seems to be supported in std::detect already though it is named avx512vaes there.

m-ou-se added a commit to m-ou-se/rust that referenced this issue Nov 18, 2020
Updated the list of white-listed target features for x86

This PR both adds in-source documentation on what to look out for when adding a new (X86) feature set and [adds all that are detectable at run-time in Rust stable as of 1.27.0](https://github.com/rust-lang/stdarch/blob/master/crates/std_detect/src/detect/arch/x86.rs).

This should only enable the use of the corresponding LLVM intrinsics.
Actual intrinsics need to be added separately in rust-lang/stdarch.

It also re-orders the run-time-detect test statements to be more consistent
with the actual list of intrinsics whitelisted and removes underscores not present
in the actual names (which might be mistaken as being part of the name)

The reference for LLVM's feature names used is [this file](https://github.com/llvm/llvm-project/blob/master/llvm/include/llvm/Support/X86TargetParser.def).

This PR was motivated as the compiler end's part for allowing rust-lang#67329 to be adressed over on rust-lang/stdarch
m-ou-se added a commit to m-ou-se/rust that referenced this issue Nov 18, 2020
Updated the list of white-listed target features for x86

This PR both adds in-source documentation on what to look out for when adding a new (X86) feature set and [adds all that are detectable at run-time in Rust stable as of 1.27.0](https://github.com/rust-lang/stdarch/blob/master/crates/std_detect/src/detect/arch/x86.rs).

This should only enable the use of the corresponding LLVM intrinsics.
Actual intrinsics need to be added separately in rust-lang/stdarch.

It also re-orders the run-time-detect test statements to be more consistent
with the actual list of intrinsics whitelisted and removes underscores not present
in the actual names (which might be mistaken as being part of the name)

The reference for LLVM's feature names used is [this file](https://github.com/llvm/llvm-project/blob/master/llvm/include/llvm/Support/X86TargetParser.def).

This PR was motivated as the compiler end's part for allowing rust-lang#67329 to be adressed over on rust-lang/stdarch
@workingjubilee
Copy link
Member

workingjubilee commented Apr 29, 2021

In #78361, a large amount of support for AVX512 features was added to the compiler, including all the ones (afaict) that IceLake included, resolving this issue for the Rust compiler, and many intrinsics have been added to std::arch since.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-SIMD Area: SIMD (Single Instruction Multiple Data) C-feature-request Category: A feature request, i.e: not implemented / a PR. O-x86_64 Target: x86-64 processors (like x86_64-*) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants