Repository navigation
Conversation
…ed time
`query_reports_in_flight_work_and_never_blocks` held the stream with a host
callback that slept 500 ms, and required `query()` to answer in under
250 ms. A loaded runner could miss either bound.
The callback now signals that it has started and waits on a gate that the
test opens only after `query()` has answered. A `query()` that waited for
the work would deadlock against the closed gate until the 30 s watchdog
opened it, so the watchdog records its expiry and the test fails on that
state. The watchdog only stops a hang.
Checked on an A10G: 30 consecutive passes, and the test fails against a
`Stream::query` that synchronizes first ("query() waited for the gated
work until the watchdog expired") and against one that always reports
complete.
Part of NVIDIA#1680.
Signed-off-by: Vyncint Ng <[email protected]>
vyncint
requested review from
elibol,
kkraus14,
nihalpasham and
rparolin
as code owners
November 4, 2026 04:24
This branch has not been deployed
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.
Part of #1680: the
cuda-core/tests/stream_query.rsrow. Theshared_allocation.rsrow is on hold for the reason in my #1680 comment.What was wrong
query_reports_in_flight_work_and_never_blocksheld the stream with a host callback that slept 500 ms, then asserted two timings:query()returned in under 250 ms;On a loaded runner, the first query can land after the sleep, or
query()can be descheduled for longer than 250 ms. Either way the test fails whilequery()is correct.How
The gate opens only after
query()has answered. Aquery()that waited for the work, for example by falling back tosynchronize(), would deadlock against the closed gate. It could return only after the watchdog gave up, so the test asserts first that the watchdog did not expire. The watchdog only stops a hang, and expiring is a failure, not a way to let the test continue.Checked
On an NVIDIA A10G (CC 8.6, driver 595.71.05), with the host crates rebuilt:
Stream::querythat synchronizes firstquery() waited for the gated work until the watchdog expiredStream::querythat always reports completea stream whose host callback is still gated must report incompletecargo fmt -p cuda-core -- --checkandcargo clippy -p cuda-core --tests -- -D warningspass.