[pr-tests][shaders] Folded 2-D group test holds ONE_AT_A_TIME while it reads DARNER_THREAD_TICKET #386
Loading…
Reference in a new issue
No description provided.
Delete branch "elgibbone/thread-ticket-lock"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What it changes
wave64_tests::the_console_threads_of_a_two_dimensional_group_are_each_given_oncesetsDARNER_THREAD_TICKETto"0"for a while and removes it, holdingONE_AT_A_TIME.folded_tests::two_dimensional_groups_of_several_host_waves_give_every_console_thread_oncelowers a wave32 program in a 32 x 2 group at host width 32, which reachesticket_on()(crates/darner-shader/src/emit/lower.rs:1653-1656), without that lock. If the two run at the same time, the folded test's shader can be lowered without the thread ticket, and on a host that fills 2-D groups from 16 x 2 tiles (NVIDIA, as the comment there says) its check fails. I have not seen it fail; this is from reading the code.The folded test now holds
ONE_AT_A_TIMEaroundlower::lowerand drops it beforerun, which takes the lock itself (taking it for the whole test would deadlock, asstd::sync::Mutexis not re-entrant). Test code only.How it was tested
de2713acargo clippy --workspace --all-targets --locked -- -D warnings: cleancargo clippy --workspace --all-targets --all-features --locked -- -D warnings: cleancargo xtask policy: 555 files okcargo test --locked -p darner-shader --lib emit::folded_tests: 20 passed, 0 failed (the changed test passes and does not hang)cargo test --locked -p darner-shader --lib emit::wave64_tests:the_console_threads_of_a_two_dimensional_group_are_each_given_oncepassed; I stopped the module run before its slowest GPU tests finished, none had failedcargo xtask policy;cargo teston the darner-shader test modules involved only, not--workspace(a workspace run on #314's branch, whose darner-shader ismain's, is reported there).Checklist
main.docs/asset-policy.md.Checked for overlap
crates/darner-shader/src/emit/folded_tests.rs; the two merge without a conflict (git merge-treeagainst its headc55f1ac).THREAD_TICKET,ONE_AT_A_TIMEand the test's name)View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.