-
Notifications
You must be signed in to change notification settings - Fork 41
Add AVX-512 kernel #100
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
Merged
Merged
Add AVX-512 kernel #100
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
f9d6e93
Add AVX512 Kernel Support
SomeB1oody b2a0438
Use `pack_avx2` and fold alpha into the final FMA
SomeB1oody d09aefd
Add CI to test AVX512 Kernel
SomeB1oody 7384668
Upgrade SDE env to v5.0 to avoid download issue during CI
SomeB1oody ca47b3f
Rename the CI test so it's more detailed
SomeB1oody 8e2d44a
Use a dedicated `pack_avx512` for the AVX-512 kernels
SomeB1oody 557770f
Update pack_avx512 to use PackSlice
bluss e679904
Add AVX512 support for cgemm/zgemm
SomeB1oody b90a16d
Address review feedback on the avx512 kernels
SomeB1oody 09070d1
Align avx512 sgemm/dgemm packed buffers to 64 bytes
SomeB1oody dd6c290
Add `avx512` feature gate (enable by default)
SomeB1oody File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,32 @@ | ||
| fn main() { | ||
| println!("cargo:rerun-if-changed=build.rs"); | ||
| if std::env::var("CARGO_CFG_TARGET_ARCH").unwrap_or(String::new()) == "aarch64" { | ||
| match autocfg::AutoCfg::new() { | ||
| // From 1.61 aarch64 intrinsics and #[target_feature] | ||
| Ok(ac) => if ac.probe_rustc_version(1, 61) { | ||
| println!("cargo:rustc-cfg=has_aarch64_simd"); | ||
| } | ||
| Err(err) => println!("cargo:warning={}", err), | ||
| let target_arch = std::env::var("CARGO_CFG_TARGET_ARCH").unwrap_or(String::new()); | ||
|
|
||
| let ac = match autocfg::AutoCfg::new() { | ||
| Ok(ac) => ac, | ||
| Err(err) => { | ||
| println!("cargo:warning={}", err); | ||
| return; | ||
| } | ||
| }; | ||
|
|
||
| // Avoid `unexpected_cfgs` lint from 1.80+ toolchains | ||
| if ac.probe_rustc_version(1, 80) { | ||
| println!("cargo::rustc-check-cfg=cfg(has_avx512)"); | ||
| } | ||
|
|
||
| if target_arch == "aarch64" { | ||
| // From 1.61 aarch64 intrinsics and #[target_feature] | ||
| if ac.probe_rustc_version(1, 61) { | ||
| println!("cargo:rustc-cfg=has_aarch64_simd"); | ||
| } | ||
| } | ||
| if target_arch == "x86" || target_arch == "x86_64" { | ||
| // From 1.89 AVX-512 intrinsics ("avx512f") | ||
| if ac.probe_rustc_version(1, 89) | ||
| && std::env::var_os("CARGO_FEATURE_AVX512").is_some() | ||
| { | ||
| println!("cargo:rustc-cfg=has_avx512"); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This comment was marked as resolved.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.