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

Rust / Test SIMD Ci test failing when compiling using packed_simd #766

Closed
alamb opened this issue Sep 10, 2021 · 7 comments · Fixed by #767
Closed

Rust / Test SIMD Ci test failing when compiling using packed_simd #766

alamb opened this issue Sep 10, 2021 · 7 comments · Fixed by #767
Labels
bug development-process Related to development process of arrow-rs

Comments

@alamb
Copy link
Contributor

alamb commented Sep 10, 2021

Describe the bug
Rust / Test SIMD Ci test began failing on active_release (and I suspect that it would fail on master as well)

@nevi-me suggests #750 (comment) that these CI failures seem to be related to a packed_simd_2 release from 15 hours ago

Here is a test PR to master with no code changes showing the issue #765 -- the failure is in https://github.com/apache/arrow-rs/pull/750/checks?check_run_id=3567651549.

Example failures:
https://github.com/apache/arrow-rs/pull/750/checks?check_run_id=3567651549

  Compiling bstr v0.2.16
error: type parameters must be declared prior to const parameters
  --> /github/home/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:20:54
   |
20 | pub unsafe fn __shuffle_vector2<const IDX: [u32; 2], T, U>(x: T, y: T) -> U
   |                                ----------------------^--^- help: reorder the parameters: lifetimes, then types, then consts: `<T, U, const IDX: [u32; 2]>`

error: type parameters must be declared prior to const parameters
  --> /github/home/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:30:54
   |
30 | pub unsafe fn __shuffle_vector4<const IDX: [u32; 4], T, U>(x: T, y: T) -> U
   |
   = note: the only supported types are integers, `bool` and `char`
   = help: more complex types are supported with `#![feature(const_generics)]`

error: `[u32; 16]` is forbidden as the type of a const generic parameter
  --> /github/home/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:50:45
   |
50 | pub unsafe fn __shuffle_vector16<const IDX: [u32; 16], T, U>(x: T, y: T) -> U
   |                                             ^^^^^^^^^
   |
   = note: the only supported types are integers, `bool` and `char`
   = help: more complex types are supported with `#![feature(const_generics)]`

error: `[u32; 32]` is forbidden as the type of a const generic parameter
  --> /github/home/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:60:45
   |
60 | pub unsafe fn __shuffle_vector32<const IDX: [u32; 32], T, U>(x: T, y: T) -> U
   |                                             ^^^^^^^^^
   |
   = note: the only supported types are integers, `bool` and `char`
   = help: more complex types are supported with `#![feature(const_generics)]`

error: `[u32; 64]` is forbidden as the type of a const generic parameter
  --> /github/home/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:70:45
   |
70 | pub unsafe fn __shuffle_vector64<const IDX: [u32; 64], T, U>(x: T, y: T) -> U
   |                                             ^^^^^^^^^
   |
   = note: the only supported types are integers, `bool` and `char`
   = help: more complex types are supported with `#![feature(const_generics)]`

error: aborting due to 12 previous errors

error: could not compile `packed_simd_2`

To Reproduce
Make a new PR without any code changes:

Expected behavior
Clean CI run ;)

Additional context
First seen by @nevi-me and @matthewmturner on #750

@jorgecarleitao
Copy link
Member

I do not have a dev env with me here, freeze nightly to nightly-2021-08-30 and relax the version to 0.3 as in here: https://github.com/jorgecarleitao/arrow2/pull/364/files. See also rust-lang/packed_simd#328

@jorgecarleitao
Copy link
Member

sorry for the noise; this is actually another one(!) I will need to investigate when I get a computer (if someone else does not beat me to it ^_^)

@alamb
Copy link
Contributor Author

alamb commented Sep 10, 2021

Seems like it is the same as rust-lang/packed_simd#330 (linked to the one you linked @jorgecarleitao ) -- thanks for the pointer

@alamb alamb added the development-process Related to development process of arrow-rs label Sep 10, 2021
@gangliao
Copy link
Contributor

$ rustup update nightly
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
  nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.57.0-nightly (2c7bc5e33 2021-09-15)

I have the same issue with the latest nightly rust. Any suggestiion?

@gangliao
Copy link
Contributor

works now

          rustup toolchain install nightly-2021-08-30
          rustup default nightly-2021-08-30

@gangliao
Copy link
Contributor

Still happen in arrow-datafusion ...

cargo build --target x86_64-unknown-linux-gnu --features "simd"
error: type parameters must be declared prior to const parameters
  --> /home/gangliao/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:20:54
   |
20 | pub unsafe fn __shuffle_vector2<const IDX: [u32; 2], T, U>(x: T, y: T) -> U
   |                                ----------------------^--^- help: reorder the parameters: lifetimes, then types, then consts: `<T, U, const IDX: [u32; 2]>`

error: type parameters must be declared prior to const parameters
  --> /home/gangliao/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:30:54
   |
30 | pub unsafe fn __shuffle_vector4<const IDX: [u32; 4], T, U>(x: T, y: T) -> U
   |                                ----------------------^--^- help: reorder the parameters: lifetimes, then types, then consts: `<T, U, const IDX: [u32; 4]>`

error: type parameters must be declared prior to const parameters
  --> /home/gangliao/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:40:54
   |
40 | pub unsafe fn __shuffle_vector8<const IDX: [u32; 8], T, U>(x: T, y: T) -> U
   |                                ----------------------^--^- help: reorder the parameters: lifetimes, then types, then consts: `<T, U, const IDX: [u32; 8]>`

error: type parameters must be declared prior to const parameters
  --> /home/gangliao/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:50:56
   |
50 | pub unsafe fn __shuffle_vector16<const IDX: [u32; 16], T, U>(x: T, y: T) -> U
   |                                 -----------------------^--^- help: reorder the parameters: lifetimes, then types, then consts: `<T, U, const IDX: [u32; 16]>`

error: type parameters must be declared prior to const parameters
  --> /home/gangliao/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:60:56
   |
60 | pub unsafe fn __shuffle_vector32<const IDX: [u32; 32], T, U>(x: T, y: T) -> U
   |                                 -----------------------^--^- help: reorder the parameters: lifetimes, then types, then consts: `<T, U, const IDX: [u32; 32]>`

error: type parameters must be declared prior to const parameters
  --> /home/gangliao/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:70:56
   |
70 | pub unsafe fn __shuffle_vector64<const IDX: [u32; 64], T, U>(x: T, y: T) -> U
   |                                 -----------------------^--^- help: reorder the parameters: lifetimes, then types, then consts: `<T, U, const IDX: [u32; 64]>`

   Compiling inventory-impl v0.1.10
   Compiling ctor v0.1.21
   Compiling typetag-impl v0.1.7
   Compiling async-trait v0.1.51
error: `[u32; 2]` is forbidden as the type of a const generic parameter
  --> /home/gangliao/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:20:44
   |
20 | pub unsafe fn __shuffle_vector2<const IDX: [u32; 2], T, U>(x: T, y: T) -> U
   |                                            ^^^^^^^^
   |
   = note: the only supported types are integers, `bool` and `char`
   = help: more complex types are supported with `#![feature(const_generics)]`

error: `[u32; 4]` is forbidden as the type of a const generic parameter
  --> /home/gangliao/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:30:44
   |
30 | pub unsafe fn __shuffle_vector4<const IDX: [u32; 4], T, U>(x: T, y: T) -> U
   |                                            ^^^^^^^^
   |
   = note: the only supported types are integers, `bool` and `char`
   = help: more complex types are supported with `#![feature(const_generics)]`

error: `[u32; 8]` is forbidden as the type of a const generic parameter
  --> /home/gangliao/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:40:44
   |
40 | pub unsafe fn __shuffle_vector8<const IDX: [u32; 8], T, U>(x: T, y: T) -> U
   |                                            ^^^^^^^^
   |
   = note: the only supported types are integers, `bool` and `char`
   = help: more complex types are supported with `#![feature(const_generics)]`

error: `[u32; 16]` is forbidden as the type of a const generic parameter
  --> /home/gangliao/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:50:45
   |
50 | pub unsafe fn __shuffle_vector16<const IDX: [u32; 16], T, U>(x: T, y: T) -> U
   |                                             ^^^^^^^^^
   |
   = note: the only supported types are integers, `bool` and `char`
   = help: more complex types are supported with `#![feature(const_generics)]`

error: `[u32; 32]` is forbidden as the type of a const generic parameter
  --> /home/gangliao/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:60:45
   |
60 | pub unsafe fn __shuffle_vector32<const IDX: [u32; 32], T, U>(x: T, y: T) -> U
   |                                             ^^^^^^^^^
   |
   = note: the only supported types are integers, `bool` and `char`
   = help: more complex types are supported with `#![feature(const_generics)]`

error: `[u32; 64]` is forbidden as the type of a const generic parameter
  --> /home/gangliao/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:70:45
   |
70 | pub unsafe fn __shuffle_vector64<const IDX: [u32; 64], T, U>(x: T, y: T) -> U
   |                                             ^^^^^^^^^
   |
   = note: the only supported types are integers, `bool` and `char`
   = help: more complex types are supported with `#![feature(const_generics)]`

@gangliao
Copy link
Contributor

Not sure why, but works now.

cargo +nightly build --target x86_64-unknown-linux-gnu --features "simd"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug development-process Related to development process of arrow-rs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants