You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CUDA 13.1 extends the stream batch memory operations with atomic reductions: a new op type CU_STREAM_MEM_OP_ATOMIC_REDUCTION with params struct CUstreamMemOpAtomicReductionParams
(operation, flags, reductionOp, dataType, address, value, alias), plus enums CUstreamAtomicReductionOpType (ADD/AND/OR) and CUstreamAtomicReductionDataType
(UNSIGNED_32/UNSIGNED_64), joined into CUstreamBatchMemOpParams_union.atomicReduction.
Device support is advertised by CU_DEVICE_ATTRIBUTE_ATOMIC_REDUCTION_SUPPORTED (13.1, see
also #2361).
cuda.core has no batch mem-op surface at all today — the only mentions are a
graph debug-dot print flag
(
"""bool: 64-bit operations are supported in cuStreamBatchMemOp and related MemOp APIs."""
).
So this issue covers designing the base surface (the pre-12.8 wait/write-value ops) and
including the 13.1 atomic-reduction op in it — adding the new op alone is not possible.
Underlying C APIs to cover
Symbol
Purpose
cuStreamBatchMemOp(CUstream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags)
execute a batch of memory operations on a stream (pre-12.8, unexposed)
Summary
CUDA 13.1 extends the stream batch memory operations with atomic reductions: a new op type
CU_STREAM_MEM_OP_ATOMIC_REDUCTIONwith params structCUstreamMemOpAtomicReductionParams(
operation,flags,reductionOp,dataType,address,value,alias), plus enumsCUstreamAtomicReductionOpType(ADD/AND/OR) andCUstreamAtomicReductionDataType(
UNSIGNED_32/UNSIGNED_64), joined intoCUstreamBatchMemOpParams_union.atomicReduction.Device support is advertised by
CU_DEVICE_ATTRIBUTE_ATOMIC_REDUCTION_SUPPORTED(13.1, seealso #2361).
cuda.corehas no batch mem-op surface at all today — the only mentions are agraph debug-dot print flag
(
cuda-python/cuda_core/cuda/core/graph/_graph_builder.pyx
Line 123 in c000331
and a
DevicePropertiessupport query(
cuda-python/cuda_core/cuda/core/_device.pyx
Line 803 in c000331
So this issue covers designing the base surface (the pre-12.8 wait/write-value ops) and
including the 13.1 atomic-reduction op in it — adding the new op alone is not possible.
Underlying C APIs to cover
cuStreamBatchMemOp(CUstream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags)CU_STREAM_MEM_OP_ATOMIC_REDUCTION+CUstreamMemOpAtomicReductionParams(13.1)CUstreamAtomicReductionOpType,CUstreamAtomicReductionDataType(13.1)CU_DEVICE_ATTRIBUTE_ATOMIC_REDUCTION_SUPPORTED(13.1)Design sketch (draft — needs design-meeting review)
Important
Starting point only, not a settled design — review in the cuda.core design meeting.
Open questions for the meeting:
aliasfield (clarify against driver docs during design).References
-- Leo's bot