Skip to content

Commit 58f8733

Browse files
authored
Initialize CUDA context in graph shutdown probe (NVIDIA#2375)
The subprocess does not inherit the pytest init_cuda fixture context. Set its device current before adding the host callback node so the probe reaches the shutdown-cleanup behavior it is intended to test.
1 parent a533b15 commit 58f8733

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

cuda_core/tests/graph/test_graph_definition_lifetime.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,8 @@ class Callback:
443443
def __call__(self):
444444
pass
445445
446-
Device()
446+
device = Device()
447+
device.set_current()
447448
graph = GraphDefinition()
448449
graph.callback(Callback())
449450
"""

0 commit comments

Comments
 (0)