From ddc6c2924ef6b1e1acddf61c674b7317acea898a Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Wed, 15 Jul 2026 12:57:57 -0700 Subject: [PATCH] Initialize CUDA context in graph shutdown probe 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. --- cuda_core/tests/graph/test_graph_definition_lifetime.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cuda_core/tests/graph/test_graph_definition_lifetime.py b/cuda_core/tests/graph/test_graph_definition_lifetime.py index cc3872bb82..a01ff8162f 100644 --- a/cuda_core/tests/graph/test_graph_definition_lifetime.py +++ b/cuda_core/tests/graph/test_graph_definition_lifetime.py @@ -443,7 +443,8 @@ class Callback: def __call__(self): pass - Device() + device = Device() + device.set_current() graph = GraphDefinition() graph.callback(Callback()) """