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

'simd-transpose' does not work on arm64 architecture #34

Open
heeckhau opened this issue Jul 19, 2023 · 1 comment
Open

'simd-transpose' does not work on arm64 architecture #34

heeckhau opened this issue Jul 19, 2023 · 1 comment

Comments

@heeckhau
Copy link
Collaborator

cargo test --features simd-transpose

results in:

...
 Compiling matrix-transpose v0.1.0 (/Users/heeckhau/tlsnotary/mpz/matrix-transpose)
error[E0432]: unresolved import `super::LANE_COUNT`
 --> matrix-transpose/src/simd.rs:1:29
  |
1 | use super::{TransposeError, LANE_COUNT};
  |                             ^^^^^^^^^^ no `LANE_COUNT` in the root

error[E0425]: cannot find function `transpose_bits` in module `simd`
  --> matrix-transpose/src/lib.rs:55:11
   |
55 |     simd::transpose_bits(matrix, rows)?;
   |           ^^^^^^^^^^^^^^ not found in `simd`

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> matrix-transpose/src/lib.rs:3:5
  |
3 |     feature(slice_split_at_unchecked),
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> matrix-transpose/src/lib.rs:4:5
  |
4 |     feature(portable_simd),
  |     ^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> matrix-transpose/src/lib.rs:5:5
  |
5 |     feature(stmt_expr_attributes),
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> matrix-transpose/src/lib.rs:6:5
  |
6 |     feature(slice_as_chunks)
  |     ^^^^^^^^^^^^^^^^^^^^^^^^

warning: unused import: `TransposeError`
 --> matrix-transpose/src/simd.rs:1:13
  |
1 | use super::{TransposeError, LANE_COUNT};
  |             ^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: `ops::ShlAssign`
 --> matrix-transpose/src/simd.rs:3:5
  |
3 |     ops::ShlAssign,
  |     ^^^^^^^^^^^^^^

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> matrix-transpose/src/lib.rs:3:13
  |
3 |     feature(slice_split_at_unchecked),
  |             ^^^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> matrix-transpose/src/lib.rs:4:13
  |
4 |     feature(portable_simd),
  |             ^^^^^^^^^^^^^

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> matrix-transpose/src/lib.rs:6:13
  |
6 |     feature(slice_as_chunks)
  |             ^^^^^^^^^^^^^^^
@heeckhau
Copy link
Collaborator Author

The LANE_COUNT can be rewritten as:

pub const LANE_COUNT: usize = if cfg!(all(feature = "simd-transpose", target_arch = "x86_64")) {
    32
} else if cfg!(all(feature = "simd-transpose", target_arch = "wasm32")) {
    16
} else {
    8
};

But I don't know what Arm supports or not

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

1 participant