Uh oh!
There was an error while loading. Please reload this page.
ARM NEON support - #32
Conversation
vielmetti
commented
Jul 30, 2019
When you have something that builds, please let me and @WorksOnArm know - would love to provide test cycles and diverse hardware to check out performance on. |
Licenser
commented
Jul 30, 2019
Thank you so much :D that's awesome! |
Licenser
commented
Jul 31, 2019
Nooo! it seems like we're going to be blocked on missing intrinsics :( https://doc.rust-lang.org/core/arch/aarch64/index.html / rust-lang/stdarch#148 |
vielmetti
commented
Jul 31, 2019
@Licenser Do you have an inventory yet of intrinsics that you need / intrinsics that are missing? Reading the linked issue, sounds like there's slow progress. |
Ah yes I made a list and then posted it to the wrong ticket ... silly me ... Those are the intrinsics I found in @lemire's arm64 implementation
(there is a full list of missing instructions on the rust ticket - those are the required ones for porting simdjson.rs) |
sunnygleason
commented
Jul 31, 2019
@Licenser alas! Would you be open to the possibility of a PR that uses assembly macros in the meantime? Maybe it won't be that far off from the intrinsic version... |
Licenser
commented
Aug 1, 2019
Absolutely, I also gave you contributor permission so no or required;) I might take a look on the weekend to see what is required to get the intrinsics at least into nighly |
sunnygleason
commented
Aug 1, 2019
@Licenser that's awesome - I'll take a pass at defining some intrinsics in 'src/neon/intrinsics.rs', and we can compare notes as you work with nightly! |
Licenser
commented
Aug 1, 2019
I started working on a pull request: rust-lang/stdarch#792 |
lemire
commented
Aug 1, 2019
We just published simdjson 0.2.0 with NEON support... |
Licenser
commented
Aug 1, 2019
Huzza! |
* feat: neon support * feat: temp stub replacements for neon intrinsics (pending rust-lang/stdarch#792) * fix: drone CI rustup nightly * feat: fix guards, use rust stdlib for bit count operations * fix: remove double semicolon * feat: fancy generic generator functions, thanks @Licenser
Licenser
commented
Aug 16, 2019
OMG OMG OMG! this is great! :D |
sunnygleason
commented
Aug 16, 2019
@Licenser are you thinking we might be able to merge this today and then have a subsequent PR to delete the intrinsics once everything's available in nightly? Thank you again for all your help. PS the new UTF8 tests look great! |
Licenser
commented
Aug 16, 2019
I'd rather not, I could see that in resulting in some headache downstream if the intrinsics make it in and that'd be very, very, very hacky for a crate. That said brave people ca already use it as a git dependency by pointing to the git branch. |
sunnygleason
commented
Aug 16, 2019
Ah, that makes sense. What is taking you so long?!! ;) |
Uh oh!
There was an error while loading. Please reload this page.
Maybe I found something? Let me know what you think... https://godbolt.org/z/36hnUE #[cfg(target_arch = "aarch64")]#[cfg_attr(target_arch = "arm", target_feature(enable = "v7"))]#[rustc_args_required_const(1)]pubunsafefnvget_lane_u8(a:uint8x8_t,n:u32) -> u8{if n < 0 || n > 7{unreachable_unchecked();};match n {0 => a.0,1 => a.1,2 => a.2,3 => a.3,4 => a.4,5 => a.5,6 => a.6,7 => a.7,
_ => unreachable_unchecked()}}(Also clang: https://clang.godbolt.org/z/TpqJIp) |
sunnygleason
commented
Aug 17, 2019
@Licenser I think your vld1q is all set, since the intrinsic turns into ldr anyway? |
Licenser
commented
Aug 17, 2019
Oh that's a very good catch! then the ld1 commands are indeed done :D for |
Licenser
commented
Aug 17, 2019
This leaves only those two functions: // uint64_t vget_lane_u64 (uint64x1_t v, const int lane)arm_vget_lane!(vget_lane_u64, uint64x1_t,u64,0);#[simd_test(enable = "neon")]unsafefntest_vget_lane_u64(){let v = i64x1::new(1);let lane = 0;let r = vget_lane_u64(transmute(v), lane);assert_eq!(r,1);}// uint32_t vgetq_lane_u32 (uint32x4_t v, const int lane)arm_vget_lane!(vgetq_lane_u32, uint32x4_t,u32,3);#[simd_test(enable = "neon")]unsafefntest_vgetq_lane_u32(){let v = i32x4::new(1,2,3,4);let lane = 1;let r = vgetq_lane_u32(transmute(v), lane);assert_eq!(r,2);} |
Licenser
commented
Aug 17, 2019
|
sunnygleason
commented
Aug 18, 2019
@Licenser that's awesome work... very nice! I think some of the "ldr" confusion is because the operands are Does this look good? Let me know what you think! All the best, -Sunny |
* Use simd-lite * Update badge * Update badge * Get rid of transmutes * Use NeonInit trait * vqsubq_u8 fix * vqsubq_u8 fix pt. 2 * use reexprted values from simd-lite



No description provided.