Skip to content

Commit 21c56b0

Browse files
Omar Atiecursoragent
authored andcommitted
fix(cuda.core): correct sync policy mapping and document enum
Use CUsynchronizationPolicy when setting syncPolicy in the Python _to_native_launch_config helper, and add SynchronizationPolicyType to api_private.rst for docs consistency checks. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 14ff25e commit 21c56b0

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎cuda_core/cuda/core/_launch_config.pyx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,9 @@ cpdef object _to_native_launch_config(LaunchConfig config):
271271
if config.synchronization_policy is not None:
272272
attr = driver.CUlaunchAttribute()
273273
attr.id = driver.CUlaunchAttributeID.CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY
274-
attr.value.syncPolicy = int(config.synchronization_policy)
274+
attr.value.syncPolicy = driver.CUsynchronizationPolicy(
275+
int(config.synchronization_policy)
276+
)
275277
attrs.append(attr)
276278

277279
drv_cfg.numAttrs = len(attrs)

‎cuda_core/docs/source/api_private.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ CUDA runtime
3535
typing.ProcessStateType
3636
typing.ReadModeType
3737
typing.SourceCodeType
38+
typing.SynchronizationPolicyType
3839
typing.VirtualMemoryAccessType
3940
typing.VirtualMemoryAllocationType
4041
typing.VirtualMemoryGranularityType

0 commit comments

Comments
 (0)