Implement AES backend for ARMv9 using SVE2-AES#403
Closed
silvanshade wants to merge 2 commits intoRustCrypto:masterfrom
silvanshade:feature/aes-armv9-sve2-aes
Closed
Implement AES backend for ARMv9 using SVE2-AES#403silvanshade wants to merge 2 commits intoRustCrypto:masterfrom silvanshade:feature/aes-armv9-sve2-aes
silvanshade wants to merge 2 commits intoRustCrypto:masterfrom
silvanshade:feature/aes-armv9-sve2-aes
Conversation
Member
|
Seems like a lot of duplication between the ARMv8 and ARMv9 backends. Perhaps you could consolidate them? Maybe a module structure like:
...would make sense? |
Member
|
@silvanshade would you have interest in reopening this? |
Contributor
Author
|
I can give it a try, sure. Will be a few days probably since I need to finish up some other project first. The main difficulty for me with this one (and the RVV one which I can also look at again) is lack of access to hardware for real-world benchmarks. The ARM9 SVE implementation we should be able to test on EC2 Graviton I think. Maybe there are other options. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 PR implements an AES backend for ARMv9 using the SVE2-AES feature.
The overall design is similar to RVV implementation since they are both VLA-style.
Most of the comments I made in that PR are relevant here as well, especially with regard to the use of
global_asm!and the opportunity for an addition to the interface for supporting N-ary parallel operations (although maybe this doesn't need to be a user-facing change, depending on the specifics).One thing to note for anyone checking the CI logs: there's unfortunately an annoying issue that causes some part of the LLVM code-gen to complain about assembly using extensions (when compiled in release mode), indicating there is an error in compilation, although the code actually compiles and runs fine and all the tests pass.
More details with link to an upstream issue: rust-lang/rust#80608
In fact this was also a problem for the RVV implementation but I was able to use the RISC-V assembly
.architecturedirective to silence the errors, like so:Unfortunately, ARMv9 assembly doesn't have an analogous directive, AFAIK. However, something could be added to the job to filter out the noise from these spurious notices if desired.
Also relevant (for switching to intrinsics in the future): rust-lang/rust#118917