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

NEON support #4

Closed
jackmott opened this issue Sep 1, 2018 · 7 comments
Closed

NEON support #4

jackmott opened this issue Sep 1, 2018 · 7 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@jackmott
Copy link
Collaborator

jackmott commented Sep 1, 2018

Neon simd instructions for arm cpus are in nightly now I believe, someone could make a new branch and start implementing the simd trait for neon

I'm happy to help anyone get started, just ask for help and I'll walk you through it. You don't need a lot of specialist knowledge, it is a nice way to learn about simd.

It will be helpful to have an arm/neon capable cpu so you can test, though it isn't necessary.

@jackmott jackmott added enhancement New feature or request help wanted Extra attention is needed labels Sep 1, 2018
@TerminalWitchcraft
Copy link
Contributor

I have a raspberry pi 3 model b(I guess it supports neon, armv8). Once I'm done with epi8, mabe I'll have a look into this implementation.

@jackmott
Copy link
Collaborator Author

jackmott commented Sep 4, 2018

I Think neon started with armv7 so yeah it should have it.
This looks like a good reference for neon intrinsics maybe:
https://developer.arm.com/technologies/neon/intrinsics

Neon will probably be a bit of a challenge since it will likely not map onto avx2 so perfectly, so we shall see what we can do!

@jackmott
Copy link
Collaborator Author

jackmott commented Sep 4, 2018

I've pushed up a new branch "neon" where Ive started experimenting with how to organize things. Neon and x86 stuff will need to be totally separated by build time configuration. You can't build x64 intrinsics if the target is arm and vice versa. it looks like the cfg_if crate will be handy for that (see mod.rs). It lets you crate blocks of code that are conditionally compiled, rather than having the put the cfg attribute before every single function and use statement, but I'm open to suggestions, still just experimenting.

keep in mind neon is only on nightly for now.

@TerminalWitchcraft
Copy link
Contributor

Thanks for the input. I'll look into it this weekend.

@jackmott
Copy link
Collaborator Author

jackmott commented Sep 5, 2018

I think it might make more sense to put the arm/neon stuff all in different files, and then conditionally pull it in from mod.rs or something, then we wouldn't need the dependency of cfg-if, and things would be less messy. I'll do more experimenting.

@jackmott
Copy link
Collaborator Author

closing this for now since Rust still doesn't have neon intrinsics yet

@wrenger
Copy link

wrenger commented Dec 25, 2022

Neon is stable for aarch64 since 1.59 (even if rustdoc is wrong about it rust-lang/stdarch#1268).
Do you still have plans (and maybe time) to add support for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants