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

Stabilize existing neon instrinsics #1125

Open
jrmuizel opened this issue Apr 19, 2021 · 10 comments
Open

Stabilize existing neon instrinsics #1125

jrmuizel opened this issue Apr 19, 2021 · 10 comments

Comments

@jrmuizel
Copy link
Contributor

Having to use nightly for NEON is pain. Is there any reason we can stabilize the intrinsics that we already have implemented? If not, what's needed to do this?

@Lokathor
Copy link
Contributor

@Amanieu
Copy link
Member

Amanieu commented Apr 19, 2021

One thing that would make me more comfortable with partial stabilization is a test that checks that the stdarch intrinsics behave identically to the C versions with random inputs.

@jrmuizel
Copy link
Contributor Author

jrmuizel commented Apr 19, 2021 via email

@Amanieu
Copy link
Member

Amanieu commented Apr 19, 2021

No. Ideally we would want a solution that can auto-generate tests for both ARM and x86.

@SparrowLii
Copy link
Member

SparrowLii commented Apr 21, 2021

One thing that would make me more comfortable with partial stabilization is a test that checks that the stdarch intrinsics behave identically to the C versions with random inputs.

How should we get the behavior of these instructions in Clang? I think this requires disassembling the corresponding Clang program and putting the result into the tests. Could it be a way to get them from llvm's document?

@JamieCunliffe
Copy link
Contributor

As mentioned on zulip, we had been looking at alternative ways to generate the intrinsics, one of the things we did could be repurposed to compare c and rust intrinsics. What we did was basically generate C programs and compile them to LLVM IR so it wouldn't be much more to actually run them to get the results.

I can change the input source to be the spreadsheet that is currently tracking intrinsics, that should make it fairly generic.

My initial thoughts were this would be a binary that was run that would generate some C and rust that calls the intrinsic with the same random inputs and then print the results of the intrinsic call, we can then diff the two programs outputs and see if anything differs. If that's the case I should hopefully be able to share something soon.

@Amanieu
Copy link
Member

Amanieu commented Apr 21, 2021

My initial thoughts were this would be a binary that was run that would generate some C and rust that calls the intrinsic with the same random inputs and then print the results of the intrinsic call, we can then diff the two programs outputs and see if anything differs. If that's the case I should hopefully be able to share something soon.

Yes that's exactly what I had in mind.

@fzyzcjy
Copy link

fzyzcjy commented Oct 27, 2021

Hi, is there any updates? NEON is very much needed with Rust! Thanks.

@bartelsielski
Copy link

#1266 stabilized the neon intrinsics for aarch64. Are there plans to also stabilize neon on 32-bit arm?

@Amanieu
Copy link
Member

Amanieu commented Feb 19, 2022

There are many intrinsics that are still buggy or missing on ARM: https://github.com/rust-lang/stdarch/blob/master/crates/intrinsic-test/missing_arm.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants