Skip to content

[spec/test] Relax relaxed_trunc semantics #1906

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

Open
wants to merge 2 commits into
base: wasm-3.0
Choose a base branch
from

Conversation

rossberg
Copy link
Member

@dtig, this implements the relaxation for relaxed_trunk we have converged on, PTAL.

I also removed all core tests that became obsolete/incorrect with this change. Unfortunately, it turns out that there are none left for relaxed_trunc, which is a bit concerning.

In fact, I then had a look at the tests for the other Relaxed SIMD instructions, and almost all of them only test a few edge cases. That is, with the exception of 5 assertions about relaxed_dot, we seem to have no tests for the “regular” behaviour of these instructions at all! That’s not good. Could somebody work on creating a suitable suite of basic tests? ;)

@rossberg rossberg requested a review from dtig May 13, 2025 11:29
@rossberg rossberg changed the title Wasm 3.0+relaxed.fix [spec/test] Relax relaxed_trunc semantics May 13, 2025
@rossberg
Copy link
Member Author

@dtig, friendly ping.

@dtig
Copy link
Member

dtig commented May 23, 2025

Sorry to have missed this, and thanks for adding.

Re. tests for regular behavior - these already exist as the original SIMD core spec tests. For example, the operations in this case would default to the ones in the deterministic profile which would be the operations introduced in the original SIMD128 proposal so in this case i32x4.trunc_sat_f32x4_s, i32x4.trunc_sat_f32x4_u, i32x4.trunc_sat_f64x2_s_zero, i32x4.trunc_sat_f64x2_u_zero, so this particular set of test would only be testing the out of bounds values or where the results would differ on different architectures. This is the case for most operations introduced in the relaxed SIMD proposal except the dot product and madd/mnadd instructions which have better coverage - though they could always be improved.

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

Successfully merging this pull request may close these issues.

2 participants