Repository navigation
Conversation
… themselves R0Y00#2405 added an operand-count refusal to s_mul_hi_u32 and s_mul_hi_i32, so the arity control's single exception (s_bfm_b32) no longer holds and main fails startup_gfx2hlsl_scalar_table_arity_check. Name the three self-checking templates and assert the rest still raise IndexError without the generic guard.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #1723
What this unblocks:
mainpassesstartup_gfx2hlsl_scalar_table_arity_checkagain, so Win2025 runs for every shader PR stop failing on this check.What
#2405 gave
s_mul_hi_u32ands_mul_hi_i32their own operand-count refusal (... expected 3). The negative control intests/startup_gfx2hlsl_scalar_table_arity_check.py(from #2515) removes the genericlen(srcs) < neededguard and expects every two-source template except one (s_bfm_b32) to raiseIndexError. Now three templates refuse by themselves, so onmainthe control reportsMISMATCH 37 of 40and the check exits 1.This PR names the templates that keep their own arity check (
OWN_ARITY = {s_bfm_b32, s_mul_hi_u32, s_mul_hi_i32}). The control now asserts that exactly the other templates raiseIndexError, and that the named ones still refuse with their own message. Only the test changes.tools/startup/gfx2hlsl.pyis untouched.Verification
Linux:
git checkout origin/main(e76f8acd5):python3 tests/startup_gfx2hlsl_scalar_table_arity_check.pygives 1 failed (control ... MISMATCH 37 of 40). The same check passes onf27737c36(the commit before startup: lower v_mul_hi_i32 and s_mul_hi_i32 in gfx2hlsl #2405) and fails on6d92f2a8f(startup: lower v_mul_hi_i32 and s_mul_hi_i32 in gfx2hlsl #2405).python3 tests/startup_gfx2hlsl_scalar_table_arity_check.pygives 0 failed.if base in ('s_mul_hi_u32', 's_mul_hi_i32') and len(srcs) != 2:withif False:intools/startup/gfx2hlsl.py. The check then fails 2 (extra ['s_mul_hi_i32', 's_mul_hi_u32']). The change was reverted afterwards.python3 tests/startup_gfx2hlsl_mul_hi_i32_check.py: ok.git diff --check: clean.Win2025: not run yet (Draft). This is a pure-Python check with no arguments, so it runs in the Windows Python-check step.
AI-assisted; commands listed were executed locally.