@@ -194,7 +194,14 @@ def test_graph_repeat_capture(init_cuda):
194194 with pytest .raises (RuntimeError , match = "^Cannot resume building after building has ended." ):
195195 gb .begin_building ()
196196
197- # Close the memroy resource now because the garbage collected might
197+ # Graph can be re-launched
198+ graph .launch (launch_stream )
199+ graph .launch (launch_stream )
200+ graph .launch (launch_stream )
201+ launch_stream .sync ()
202+ assert arr [0 ] == 4
203+
204+ # Close the memory resource now because the garbage collected might
198205 # de-allocate it during the next graph builder process
199206 b .close ()
200207
@@ -239,7 +246,7 @@ def test_graph_conditional_if(init_cuda, condition_value):
239246 pytest .skip ("Driver does not support conditional handle" )
240247 launch (gb , LaunchConfig (grid = 1 , block = 1 ), set_handle , handle , condition_value )
241248
242- # # Add Node B (if condition)
249+ # Add Node B (if condition)
243250 gb_if = gb .if_cond (handle ).begin_building ()
244251 launch (gb_if , LaunchConfig (grid = 1 , block = 1 ), add_one , arr .ctypes .data )
245252 gb_if_0 , gb_if_1 = gb_if .split (2 )
@@ -267,7 +274,7 @@ def test_graph_conditional_if(init_cuda, condition_value):
267274 assert arr [0 ] == 1
268275 assert arr [1 ] == 0
269276
270- # Close the memroy resource now because the garbage collected might
277+ # Close the memory resource now because the garbage collected might
271278 # de-allocate it during the next graph builder process
272279 b .close ()
273280
@@ -339,7 +346,7 @@ def test_graph_conditional_if_else(init_cuda, condition_value):
339346 assert arr [0 ] == 1
340347 assert arr [1 ] == 3
341348
342- # Close the memroy resource now because the garbage collected might
349+ # Close the memory resource now because the garbage collected might
343350 # de-allocate it during the next graph builder process
344351 b .close ()
345352
@@ -430,7 +437,7 @@ def test_graph_conditional_switch(init_cuda, condition_value):
430437 assert arr [1 ] == 0
431438 assert arr [2 ] == 0
432439
433- # Close the memroy resource now because the garbage collected might
440+ # Close the memory resource now because the garbage collected might
434441 # de-allocate it during the next graph builder process
435442 b .close ()
436443
@@ -479,7 +486,7 @@ def test_graph_conditional_while(init_cuda, condition_value):
479486 else :
480487 assert arr [0 ] == 0
481488
482- # Close the memroy resource now because the garbage collected might
489+ # Close the memory resource now because the garbage collected might
483490 # de-allocate it during the next graph builder process
484491 b .close ()
485492
@@ -532,7 +539,7 @@ def test_graph_child_graph(init_cuda):
532539 assert arr [0 ] == 2
533540 assert arr [1 ] == 3
534541
535- # Close the memroy resource now because the garbage collected might
542+ # Close the memory resource now because the garbage collected might
536543 # de-allocate it during the next graph builder process
537544 b .close ()
538545
@@ -625,7 +632,7 @@ def build_graph(condition_value):
625632 assert arr [1 ] == 3
626633 assert arr [2 ] == 3
627634
628- # Close the memroy resource now because the garbage collected might
635+ # Close the memory resource now because the garbage collected might
629636 # de-allocate it during the next graph builder process
630637 b .close ()
631638
@@ -673,7 +680,7 @@ def test_graph_dot_print_options(init_cuda, tmp_path):
673680 handle = gb .create_conditional_handle ()
674681 launch (gb , LaunchConfig (grid = 1 , block = 1 ), set_handle , handle , False )
675682
676- # # Add Node B (if condition)
683+ # Add Node B (if condition)
677684 gb_if = gb .if_cond (handle ).begin_building ()
678685 launch (gb_if , LaunchConfig (grid = 1 , block = 1 ), empty_kernel )
679686 gb_if_0 , gb_if_1 = gb_if .split (2 )
0 commit comments