gpu: parallelize batch clamp reads and add single-group atomic fast path #5059
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5059"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by danielibabet on 2026-12-01T18:43:02Z.
Summary
crates/victory-gpu/src/indirect/batch.rs):count, this thread'sjob, and the currentbudgettogether at shader entry instead of issuing serialized dependent loads (jobs.Load(0)->jobs.Load4->budget.InterlockedOr(0, 0, ...)->InterlockedCompareExchange).count <= 64(a single thread group, so no other group races for the budget) and all jobs fit withinBUDGET - seen, charge the budget with one non-CASbudget.InterlockedAdd(0, total, ...)instead ofInterlockedOr+ CAS loop.InterlockedOr+InterlockedCompareExchangepath whencount > 64or when any job exceeds the remaining budget.Verification
cargo test --locked -p victory-gpu --lib -j 16 -- indirect::: 37 passed, 0 failed, 11 ignored (includinghost_list_batches,warp_batch_clamps_as_the_clamp_of_one_does,warp_batch_charges_every_execution,warp_batch_saturates_budget_when_rest_is_enabled).cargo clippy --workspace --all-targets --locked -j 16(default &--all-features, ignoring pre-existingorigin/mainlints inhost/{font,menu,panel}.rs): passed.cargo xtask policy:asset policy: 464 files ok.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.