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 |
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 makes GPU-table cloning safe without turning the read-only clone path into a host-blocking operation.
wait_until_ready()before reading it.clone()API is removed. Read-onlyclone()remains asynchronous, while the existing same-device mutableclone_to()compatibility path still returns a ready copy.release_table()waits for producer work, materializes with the representation's allocator, and keeps the view owner alive until all queued reads finish. Its exception path drains any work that may have been enqueued before rethrowing.Failure example:
clone()Assume a source allocation initially contains zeroes:
0x5aand source writer event Wsrc queued behind the pause.clone()while P is still paused.0x5a.The fixed dependency chain is:
clone()can return while C is pending. Rsrc protects the source lifetime, and Wclone makes destination readiness explicit to consumers.Failure example:
release_table()For a view-backed representation, the variant stores both a
cudf::table_viewand the sole shared owner of the buffers. The old implementation effectively did this:auto view = std::get<owning_table_view>(_table).view _table = std::make_unique<cudf::table>(view, release_stream, allocator);Constructing the new table can enqueue asynchronous reads of
view. Once the right-hand side finishes constructing, assigning it to_tabledestroys the variant's old view-backed alternative—and therefore its sole owner—even thoughrelease_streammay not have executed those reads yet. This is a use-after-free race.The fixed path waits for the source writer, starts materialization, synchronizes
release_stream, and only then replaces the variant alternative. If construction throws after enqueueing work, it drains the stream before unwinding so the retained owner cannot be destroyed under in-flight reads.