bitshifter / mathbench-rs

Comparing performance of Rust math libraries for common 3D game and graphics tasks
Other
197 stars 16 forks source link

Benchmark for pathfinder is broken on latest nightly #35

Open utensil opened 2 days ago

utensil commented 2 days ago

Simply cargo bench --features scalar scalar after clone results in compile error:

error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: simd_shuffle index must be a SIMD vector of `u32`, got `[u32; 2]`
   --> ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pathfinder_simd-0.5.4/src/arm/mod.rs:348:24
    |
348 |         unsafe { F32x2(simd_shuffle2!(self.0, self.0, [2, 3])) }
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in the macro `simd_shuffle2` (in Nightly builds, run with -Z macro-backtrace for more info)

(...omitted...)

This is reported as servo/pathfinder#571, and the root causes are identified in the comments (Rust changes). There is also a temporary solution by Zed developers: https://github.com/servo/pathfinder/compare/main...theoparis:pathfinder:05f19143e21a96027de7cf2d60fa47ecd8899d21 , which works for my MacBookPro M1.

A temporary workaround for mathbench-rs is to use such fixed branch, namely:

[dependencies.pathfinder_geometry]
git = "https://github.com/theoparis/pathfinder.git"
rev = "05f19143e21a96027de7cf2d60fa47ecd8899d21"
optional = true
bitshifter commented 1 day ago

Weirdly I updated some other dependencies that were out of date and then tried compiling with rustc 1.84.0-nightly (3f1be1ec7 2024-10-28) and everything built with out errors. I was on a slightly older version of vek, but pathfinder didn't change. Could you update mathbench and check with the latest nightly?

utensil commented 1 day ago

I've bumped my nightly to

 nightly-aarch64-apple-darwin updated - rustc 1.84.0-nightly (3f1be1ec7 2024-10-28) (from rustc 1.84.0-nightly (27861c429 2024-10-13))

and use your new cargo.toml, the compilation error for pathfinder is the same.

utensil commented 1 day ago

Rereading related issues, this issue applies to aarch64, both stable and nightly.