Skip to content

perf(gpu): hash card copy pieces with 64 threads per piece - #23

Merged
ShinniUwU merged 3 commits into
mainfrom
perf/card-hash-pieces
Nov 26, 2026
Merged

ShinniUwU merged 3 commits into
mainfrom
perf/card-hash-pieces

Conversation

@ShinniUwU

Copy link
Copy Markdown
Contributor

The compare and rehash passes over copies in the card's memory now walk each 64 KiB piece with a group of 64 threads instead of one thread, 64 steps after one another instead of 4,096. Ported from avatarmanz/VIctory-7900XTX f669746.

Not a TODO item; it is closest to the card-time part of P-6, which it does not finish, so no row is deleted.

Measured

RTX 3080 12 GB (driver 621.24), Ryzen 7 7800X3D, 32 GB, Series X profile, first rooms, diagnostics build, about 5 minutes per run. Both runs had LEONIDA_CARD_WINDOWS_MB=3072, LEONIDA_WINDOW_UPLOAD=1 and LEONIDA_TEXTURE_ROOM_PERCENT=70 on.

Before After
Our send-and-hash and compare lists, card time a frame about 21 ms about 3.6 ms
Usual frame 149-158 ms 129-135 ms

No device loss in either run.

Tested

  • cargo test --workspace --locked: 591 passed, 0 failed (on the branch this was first made on).
  • cargo test -p leonida-gpu card: 16 passed, including the WARP tests of the compare and the in-flight fetch. One test dispatched one group for four pieces and now dispatches one per piece.
  • cargo check --workspace --all-targets and cargo xtask policy pass on this branch.
  • clippy -D warnings still reports the C-1 errors already on main; C-1: resolve clippy warnings in leonida-gpu #20 fixes those.

Not behind a switch: the same shader makes and compares the hashes, so only the hash values change, not which pieces count as changed.

AI-assisted.

🤖 Generated with Claude Code

ShinniUwU and others added 3 commits November 26, 2026 10:15
The compare and rehash passes over copies in the card's memory walk each
64 KiB piece with a group of 64 threads instead of one thread, after
avatarmanz/VIctory-7900XTX f669746. RTX 3080, Ryzen 7 7800X3D, first
rooms: our send-and-hash and compare lists 21 -> 3.6 ms of card time a
frame, usual frame 149-158 -> 129-135 ms.
@ShinniUwU
ShinniUwU merged commit b81d470 into main Nov 26, 2026
1 check failed
@ShinniUwU
ShinniUwU deleted the perf/card-hash-pieces branch November 26, 2026 09:40
ShinniUwU added a commit that referenced this pull request Nov 26, 2026
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.

1 participant