Skip to content

Commit

Permalink
Fix test_is_done without a sync
Browse files Browse the repository at this point in the history
Event might not have yet completed when a synchronize is skipped
  • Loading branch information
vzhurba01 committed Dec 16, 2024
1 parent ddc1f94 commit 7811065
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cuda_core/tests/test_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,6 @@ def test_is_done(init_cuda):
options = EventOptions(enable_timing=False)
stream = Device().create_stream()
event = stream.record(options=options)
assert event.is_done is True
# Without a sync, the captured work might not have yet completed
# Therefore this check should never raise an exception
assert event.is_done in (True, False)

0 comments on commit 7811065

Please sign in to comment.