Conversation
kevkrist
marked this pull request as ready for review
August 13, 2026 14:48
This comment was marked as resolved.
This comment was marked as resolved.
kevkrist
force-pushed
the
agent/hybrid-zero-copy-hash-partition
branch
from
September 17, 2026 16:28
410d697 to
24496d8
Compare
Member
|
/ok to test 24496d8 |
kevkrist
force-pushed
the
agent/hybrid-zero-copy-hash-partition
branch
from
September 17, 2026 18:54
24496d8 to
fd85240
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This change orders GPU-table reads performed by
clone()andrelease_table()after therepresentation's recorded writer work, without host-synchronizing the consumer stream.
when the writer is the CUDA default stream.
clone()waits for the source writer event on the clone stream before enqueueing its deep copy.The cloned representation records its own writer event and
clone()may return while that streamis still pending.
release_table()waits for the source writer event on the release stream before an owned table ishanded off or a view-backed table is materialized. It may likewise return while the release stream
is still pending.
clone()andrelease_table().Failure example:
clone()Assume a source allocation initially contains zeroes:
0x5aand source writer event Wsrc queuedbehind the pause.
clone()while P is still paused.to read the old zeroes instead of
0x5a.writer event Wclone.
The resulting dependency chain is:
clone()remains asynchronous: it can return while C is pending. The caller must keep thesource alive and unmodified until the clone-stream work completes. A consumer of the clone must
wait for Wclone before reading it from another stream.
Failure example:
release_table()Before this fix,
release_table()could hand an owned table to another stream, or beginmaterializing a view-backed table there, without ordering that stream after the producer. The
release stream could therefore observe stale or partially written source data.
The fixed path inserts a wait for the representation's writer event on the release stream before
the table is handed off or materialized. The operation remains asynchronous and does not
synchronize the release stream. For a view-backed representation, the external owner must continue
to keep the viewed allocations alive and unmodified until the queued materialization completes.
Scope
This patch does not register clone work as an asynchronous
data_batchreader, add await_until_ready()API, change the mutable clone/clone_to()APIs, synchronize clone or releasestreams, or add exception-path stream draining. Those lifetimes remain governed by the documented
caller preconditions.