Add support for Hexagon HVX#509
Conversation
|
Successor to #500 Note that llvm/llvm-project#182520 causes some problems in some use cases. Hopefully the fix lands soon to make it into 22.x and then into Rust. |
|
@programmerjake can you review this PR? Or can you give me advice on who should review it? tyvm |
| @@ -0,0 +1,433 @@ | |||
| #![cfg(target_arch = "hexagon")] | |||
There was a problem hiding this comment.
I think these tests are actually largely unnecessary, you should be able to test by running the already existing tests with your -C flags
| use crate::simd::*; | ||
|
|
||
| #[cfg(target_feature = "hvx-length128b")] | ||
| use core::arch::hexagon::v128::HvxVector; |
There was a problem hiding this comment.
I would pull these imports into the modules they're used in. Seems vector lengths should be mutually exclusive but we should still avoid running into that
| from_transmute! { unsafe u64x16 => HvxVector } | ||
| from_transmute! { unsafe i64x16 => HvxVector } | ||
|
|
||
| // Note: u8x128/i8x128 don't exist in portable-simd |
There was a problem hiding this comment.
Maybe add a FIXME/TODO to make it easier to find in the future
Add vendor module and tests for Qualcomm Hexagon HVX (Hexagon Vector eXtension) SIMD support. HVX provides wide vector operations in either 64-byte (512-bit) or 128-byte (1024-bit) mode. Note: u8x128/i8x128 types are not included because portable-simd currently limits lane count to 64 (bitmask operations use u64). In 128-byte HVX mode, u8x64 maps to a half-vector (512-bit).
fixup! Add support for Hexagon HVX Address reviewer feedback: - Remove hexagon_hvx test file (existing tests suffice with -C flags) - Move HvxVector imports into their respective cfg modules - Change u8x128/i8x128 comment to FIXME for discoverability
cd7cacf to
39c18af
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
Thank you! |
Add vendor module and tests for Qualcomm Hexagon HVX (Hexagon Vector eXtension) SIMD support. HVX provides wide vector operations in either 64-byte (512-bit) or 128-byte (1024-bit) mode.
Note: u8x128/i8x128 types are not included because portable-simd currently limits lane count to 64 (bitmask operations use u64). In 128-byte HVX mode, u8x64 maps to a half-vector (512-bit).