rust-lang / portable-simd

The testing ground for the future of portable SIMD in Rust
Apache License 2.0
875 stars 79 forks source link

do not run the 4-lane tests in Miri #412

Closed RalfJung closed 5 months ago

RalfJung commented 5 months ago

This should cut down the CI times for the Miri job.

Also only test one non-power-of-2 configuration (if/when that ever gets enabled) in Miri, again to avoid the tests taking too long. I don't see why odd vs even non-power-of-2 would make a big difference for Miri.

programmerjake commented 5 months ago

I don't see why odd vs even non-power-of-2 would make a big difference for Miri.

oh, that's because of alignment -- the layout I proposed would have align 1 for Simd<u8, 5> but align 2 for Simd<u8, 6>, since basically it picks the biggest alignment that doesn't require padding.

so, it won't make any difference now, but later assuming we use the proposed layout, it will make a difference since Miri can (hopefully) catch misaligned accesses.

RalfJung commented 5 months ago

Current layout adds padding to make the size a power of 2. There does not seem to be consensus on what the layout should be. Anyway that is a discussion for https://github.com/rust-lang/portable-simd/issues/319.

But no matter whether alignment is the next power of 2 or the largest power that divides the unpadded size, even length does not seem fundamentally different from odd length to me.

RalfJung commented 5 months ago

With this, Miri takes 27min. The second-slowest job seems to be "default on aarch64-unknown-linux-gnu" which takes 19min.

The only way I see to further reduce CI times is to only test the 2-lane tests in Miri.