GPU: stage HostHeap descriptor updates until submission flush #2048
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2048
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2048/head"
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?
@fuzeofficlal on GitHub · 2026-11-25 04:06 UTC · original
fuzeofficlal:fix/gpu-multilist-submission-sync-1348→main· +1396 −111 · 5 files · 1 commits · closed without mergingRefs #1348.
Summary
HostHeapdescriptor writes (mirror,make_at,make_null,raw_view_at,raw_pair_at) into CPU-only staging chunks and publish each slot atomically alongside itsstrides,marks, andaddressesside-table entries inHostHeap::flush, called underHost::execute's submission lock right beforeExecuteCommandListsand again after the submission finishes waiting, beforerelease_retired.HostHeap::view_addressessynchronized withHostHeap::flushviaStaged::published_addresses(under thestagedmutex) rather than readingself.madedirectly, so unflushedmadeupdates never leak into the view-address buffer ahead of their staged descriptors.alloc_staged(CreateDescriptorHeap) fails instead of dropping slot updates.Verification
descriptor::host::tests::concurrent_slot_rewrites_do_not_corrupt_in_flight_32_list_submissiondescriptor::host::tests::staged_slots_publish_descriptors_and_side_tables_atomicallydescriptor::host::tests::view_addresses_stays_synchronized_with_staged_flushesdescriptor::host::tests::alloc_staged_failure_falls_back_to_direct_writescargo clippy -p victory-gpu --tests --locked -- -D warningsandcargo xtask policy: passed.@jeremygold02 on GitHub · 2026-11-25 04:14 UTC · original
Triage verdict — Keep the staging approach, publish each slot atomically (
da8574b)Evidence
Checks and limits
Next step
This verification was AI-assisted.
@fuzeofficlal on GitHub · 2026-11-25 04:50 UTC · original
Updated in
cdc6fbd0— thanks @jeremygold02 for catching the split staging window:StagedOpqueue pushes with compositeStagedSlot { index, descriptor, stride, mark, address }records committed in a singlecommit_stagedlock scope acrossmirror,make_at,make_null,raw_pair_at(both pair slots together), andraw_view_at(..., mark)(eliminating the separateset_markcall inState::root_view).staged_slots_publish_descriptors_and_side_tables_atomicallytesting deterministic pre/post-flush isolation, 4,000 interleaved flushes against concurrent slot rewrites, and 16 GPU compute dispatches readingHostHeapand all three side tables simultaneously across RTX 5090, AMD RDNA2, and WARP.@Marvisak on GitHub · 2026-11-25 09:20 UTC · original · edited 2026-11-25 15:55 UTC
Automated triage for the maintainers.
This pull request no longer merges cleanly into
main(conflicts incrates/victory-gpu/src/descriptor.rs,crates/victory-gpu/src/descriptor/host.rs,crates/victory-gpu/src/host.rs). It will be reviewed once it is rebased onto the currentmain. The earlier verdict (needs-work) was for an older state ofmain.Generated by Claude Code
@fuzeofficlal on GitHub · 2026-11-25 10:34 UTC · original
Updated in
40d0bcecper triage feedback:view_addressessynchronization:HostHeap::view_addressesnow initializes fromStaged::published_addressesunder thestagedlock (and updatespublished_addresses+addresses_dataatomically insidewrite_side_tablesduringflush), rather than readingself.madedirectly ahead of staged descriptors. Covered byview_addresses_stays_synchronized_with_staged_flushes.alloc_stagedfallback & warning: WhenCreateDescriptorHeapfails inalloc_staged, it now logs a one-timetracing::warn!and falls back (target_handles+finish_slots(..., false)) to writing descriptors and side tables directly instead of dropping the update. Covered byalloc_staged_failure_falls_back_to_direct_writes.descriptor.rs,descriptor/host.rs,host.rs, andmemory.rsto state accurately that staged updates are published underHost::execute's submission lock beforeExecuteCommandListsand again after completion beforerelease_retired, and changedCloses #1348toRefs #1348.@fuzeofficlal on GitHub · 2026-11-25 13:15 UTC · original
Updated in
dfb80933(rebased onto940d32f) to fix the fallback-ordering issue noted above:target_handles/finish_slots(.., false): Whenalloc_stagedfalls back to direct writes, queuedStagedSlotentries for those slot indices are dropped underself.stagedbefore writing directly and before updating side tables, so a subsequentflushcannot overwrite the newer direct descriptor or side-table entries.direct_fallback_drops_older_queued_updates_for_the_same_slotcovering queued staged writes followed byfail_allocdirect writes andflush.@andrewpozdnakov7-jpg on GitHub · 2026-11-25 13:20 UTC · original
I verified the updated
dfb8093on Windows app-local WARP. All 10descriptor::host::testspassed, includingdirect_fallback_drops_older_queued_updates_for_the_same_slot. The readbacks cover both the direct replacement in slot 0 and the unrelated staged update in slot 1. I also reproduced the stale replay on the previous40d0bcewith an independent two-slot fixture.AI-assisted with Codex. Synthetic buffers only.
@fuzeofficlal on GitHub · 2026-11-25 16:11 UTC · original
Closing for now:
da82e444refactoredHostHeapdescriptor creation/eviction and 16-byte view-address side tables (42ea09f,f809521,52d14b1,e790217), and we do not have an in-title A/B run past#1348to justify rebasing this core-path staging layer.Pull request closed