Skip to content

Commit 27f674c

Browse files
committed
Change default build mode to RELAXED
1 parent 1c41c2a commit 27f674c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

cuda_core/cuda/core/experimental/_graph.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def is_join_required(self) -> bool:
189189
"""Returns True if this graph builder must be joined before building is ended."""
190190
return self._mnff.is_join_required
191191

192-
def begin_building(self, mode="global") -> GraphBuilder:
192+
def begin_building(self, mode="relaxed") -> GraphBuilder:
193193
"""Begins the building process.
194194
195195
Build `mode` for controlling interaction with other API calls must be one of the following:
@@ -202,6 +202,7 @@ def begin_building(self, mode="global") -> GraphBuilder:
202202
----------
203203
mode : str, optional
204204
Build mode to control the interaction with other API calls that are porentially unsafe.
205+
Default set to use relaxed.
205206
206207
"""
207208
if self._building_ended:
@@ -214,6 +215,8 @@ def begin_building(self, mode="global") -> GraphBuilder:
214215
capture_mode = driver.CUstreamCaptureMode.CU_STREAM_CAPTURE_MODE_THREAD_LOCAL
215216
elif mode == "relaxed":
216217
capture_mode = driver.CUstreamCaptureMode.CU_STREAM_CAPTURE_MODE_RELAXED
218+
else:
219+
raise ValueError(f"Unsupported build mode: {mode}")
217220

218221
if self._mnff.conditional_graph:
219222
handle_return(

0 commit comments

Comments
 (0)