WebAssembly / spec

WebAssembly specification, reference interpreter, and test suite.
https://webassembly.github.io/spec/
Other
3.09k stars 438 forks source link

SIMD test optimization? #1724

Open SoniEx2 opened 4 months ago

SoniEx2 commented 4 months ago

A lot of the SIMD tests run the same floats through all of the lanes, instead of just assuming lanewise operations to be implemented in a lanewise way. Is there any particular reason to do it this way? You could probably cut down the size of the tests by a factor of 2 or 4 if you just assumed all the lanes behave the same.

rossberg commented 4 months ago

Isn't more detailed testing and more coverage always better?

SoniEx2 commented 4 months ago

it would certainly be able to catch hardware bugs that only manifest with certain lanes.

but it also takes 4x longer?

dtig commented 4 months ago

Is speed a constraint for running tests? For operations that don't map to a single hardware instruction, or for engines that scalarize, testing all lanes could still be helpful in catching implementation bugs.