GPU → CPU: let the GPU mark the pages that need a read-back #1306
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork#1306
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@liuycsbxbxn on GitHub · 2026-11-26 13:31 UTC · original
Split out of #1273.
Suggested labels: performance / gpu
Verification cost:
[GPU][TITLE]What the meta-issue asks
Current shape
Acceptance
VICTORY_*) that reads back only flagged pages, off by default.@JayFoxRox on GitHub · 2026-11-26 16:42 UTC · original · edited 2026-11-26 16:49 UTC
Some information was lost in transition from #1273.
Currently, my understanding is that the GPU hasher communicates which pages changed, and then changed pages get downloaded to the CPU / system-RAM again (periodically?). Even if there is already on-demand page fetching (by using guard-pages) the following should still be a performance improvement.
When the CPU reads from (the guard page system-RAM copy of) a GPU resource, currently a guard page exception occurs which eventually triggers a redownload of the GPU side memory to the CPU. However, page-exceptions are slow and the current approach requires unlocking and relocking pages.
The proposals are
@liuycsbxbxn on GitHub · 2026-11-26 17:02 UTC · original
Fair point — the split dropped the rationale. Restoring it so this stands on its own:
today the GPU hasher reports which pages changed, and the changed ranges are copied back to system RAM on a schedule, whether or not the CPU ever touches them. On-demand fetch already exists via guard pages, so this is an optimisation on top of that, not a replacement — and it is still worth doing, because when the CPU does read, avoiding the fault + re-lock path is where the win is.
Agreed that #1305 is the prerequisite: without the trampoline, any on-demand path still pays the exception and the re-lock cost you cite. So the order I would propose is #1305 first, then this as a switch that gates the download on an actual CPU read. #1307 is the mirror case, on the write side.