Skip to content

fix(data): order GPU representation reads after writers - #182

Open
kevkrist wants to merge 3 commits into
NVIDIA:mainfrom
kevkrist:agent/hybrid-zero-copy-hash-partition
Open

fix(data): order GPU representation reads after writers#182
kevkrist wants to merge 3 commits into
NVIDIA:mainfrom
kevkrist:agent/hybrid-zero-copy-hash-partition

Conversation

@kevkrist

@kevkrist kevkrist commented Aug 12, 2026

Copy link
Copy Markdown

Wait for recorded writer events before cloning, materializing, or converting GPU tables. Retain view ownership until asynchronous materialization completes, preventing cross-stream reads from racing producer work or freed buffers.

Regression coverage

This PR adds a deterministic cross-stream clone regression test in test_data_representation.cpp. It initializes the source allocation to zeros, blocks the producer stream before a queued write and the recorded writer event, then calls clone() on a separate consumer stream.

The test fails on main in two observable ways: clone() returns while the producer remains blocked, and the cloned buffer contains the stale zero pattern instead of the written value. The main implementation schedules the deep copy on the consumer stream without first waiting for the source writer event. This PR inserts the necessary stream dependency, so clone() remains blocked until the writer completes and copies the expected bytes.

The test commit also updates the remaining Catch2 v2 catch.hpp include to the Catch2 v3 catch_all.hpp header so the test target builds with the current dependency.

Validation

  • pixi run build
  • pixi run test (4/4 CTest targets)
  • focused cuDF tests (537 assertions across 91 cases)
  • repeated stream-ordering regression test
  • negative control using the main clone() implementation: the regression test fails on premature completion and stale copied data
  • changed-file lint and Doxygen
  • Sirius integration tests

@copy-pr-bot

copy-pr-bot Bot commented Aug 12, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@kevkrist
kevkrist marked this pull request as ready for review August 13, 2026 14:48
@kevkrist kevkrist changed the title Order GPU representation reads after writers fix(data): order GPU representation reads after writers Aug 14, 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