Repository navigation
Conversation
…er invocation run_workgroup runs one generator per invocation over the same SPIR-V text, and each one split and regex-matched every line again. The parsed lines are now cached by text (a line that does not parse still raises where it is reached). test_saveexec_b64 40.9 s -> 24.5 s, test_wave64_scmp_masks 38.2 s -> 19.9 s; the 366 semantic test files give the same results.
Kam471
reviewed
Nov 23, 2026
Kam471
left a comment
Contributor
There was a problem hiding this comment.
Ran this at aa8a9868 on Windows 11: python tests/semantic/test_interp.py -> 36 tests, OK; git diff --check clean.
The interpreter now parses a module once per run instead of per invocation; the existing interpreter value cases pass, including the ones that exercise repeated run() calls on one module. No blocking issue.
|
Tested
AI-assisted (Devin). |
whattheflop
reviewed
Nov 23, 2026
whattheflop
left a comment
Contributor
There was a problem hiding this comment.
AI-assisted independent Windows CPU check of aa8a9868, including a clean scratch merge with #3952 de0bed34 (tree 6ffca5cd). uv CPython 3.12.13, synthetic SPIR-V only.
- Three 64-lane calls over the same compute text used different inputs and push constants. All 192 outputs matched on the parent, PR and combined tree. The third call reused the first call's storage map and observed its earlier writes. A separate fragment input and branch check matched across all three trees.
- The compute case made 9,408 parser line matches on the parent and 49 total on the PR and combined tree. The second and third calls added zero matches with the cache. These are parser counts.
- The combined tree passed 39 focused tests and 66 subtests, selecting ordinary defined cases. The two isolation modules and four #3952 pointer variants passed
spirv-valfor Vulkan 1.2. Replacing a whole aggregate or enclosing member preserved existing pointers with #3952, and the Workgroup atomic saw the updated value.
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.
Item: new, claimed here.
Depends on: none.
run_workgroup runs one generator per invocation (64 to 128 lanes) over the same SPIR-V text, and
_invocationsplit and regex-matched every line again for each one. In test_saveexec_b64 that is 6.1 Mre.match+str.splitcalls in a 90 s profile. The parsed lines are now cached by text (_parsed_lines, at most 64 texts); a line that does not parse is cached as such and still raises where it is reached.Measured (CPython 3.13, idle machine, same checkout before/after): test_saveexec_b64 40.9 s -> 24.5 s, test_wave64_scmp_masks 38.2 s -> 19.9 s. 271 semantic test files use the interpreter.
Same results: all 366 semantic test files run one by one: 362 OK; the same 4 fail on origin/main with the same counts before and after (test_cmp_class_f64 failures=2, test_loop_ballot_barrier failures=3 errors=2, test_mutations failures=2, test_vcmp16_opsel errors=1). New case in test_interp.py: a module run twice gives the same words and the same parse error.
Duplicate check: PR searches "spirv_mini_interp", "run_workgroup", "parse cache", "interpreter speed", "mini interpreter faster"; open PRs touching the file (#4225, #4172, #4122, #4100, #4069, #3952, #3444) change other hunks. git log -S_parsed_lines: nothing.
AI-assisted. No game files.