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.0 makes atomic-operation support queryable per device and per peer path:
cuDeviceGetHostAtomicCapabilities(unsigned int* capabilities, const CUatomicOperation* operations, unsigned int count, CUdevice dev)
— batch query: array of operations in, per-operation capability bitmask out (host↔device scope);
cuDeviceGetP2PAtomicCapabilities(unsigned int* capabilities, const CUatomicOperation* operations, unsigned int count, CUdevice srcDevice, CUdevice dstDevice)
— same, for a peer-to-peer path.
Supporting enums: CUatomicOperation (integer add/min/max/increment/decrement/and/or/xor,
exchange, CAS, float add/min/max — 14 values) and CUatomicOperationCapability
(SCALAR_32/64/128, VECTOR_32x4, SIGNED, UNSIGNED, REDUCTION). Related additions: CU_DEVICE_P2P_ATTRIBUTE_ONLY_PARTIAL_NATIVE_ATOMIC_SUPPORTED (13.0) and CU_DEVICE_ATTRIBUTE_ATOMIC_REDUCTION_SUPPORTED (13.1).
The plain 13.0 device attributes for partial host atomics are already exposed via DeviceProperties; the capability-query APIs and their enums are not exposed anywhere in cuda.core. Natural consumers are dispatch layers (numba-cuda, cuda.compute, cuda.cccl)
choosing between native atomics, CAS loops, or host fallbacks.
StrEnum wrappers + mapping dicts following the cuda.core.typing conventions; batch-in /
batch-out mirroring the C API so N operations cost one driver call.
Open questions for the meeting:
Result shape: dict of frozensets (above) vs. an IntFlag-style value per operation.
Home: Device method vs. a property namespace (dev.properties-adjacent)?
Scope naming: peer= kwarg vs. separate host/p2p methods.
Version gating: 13.0+ (13.1 for the reduction attribute).
Summary
CUDA 13.0 makes atomic-operation support queryable per device and per peer path:
cuDeviceGetHostAtomicCapabilities(unsigned int* capabilities, const CUatomicOperation* operations, unsigned int count, CUdevice dev)— batch query: array of operations in, per-operation capability bitmask out (host↔device scope);
cuDeviceGetP2PAtomicCapabilities(unsigned int* capabilities, const CUatomicOperation* operations, unsigned int count, CUdevice srcDevice, CUdevice dstDevice)— same, for a peer-to-peer path.
Supporting enums:
CUatomicOperation(integer add/min/max/increment/decrement/and/or/xor,exchange, CAS, float add/min/max — 14 values) and
CUatomicOperationCapability(
SCALAR_32/64/128,VECTOR_32x4,SIGNED,UNSIGNED,REDUCTION). Related additions:CU_DEVICE_P2P_ATTRIBUTE_ONLY_PARTIAL_NATIVE_ATOMIC_SUPPORTED(13.0) andCU_DEVICE_ATTRIBUTE_ATOMIC_REDUCTION_SUPPORTED(13.1).The plain 13.0 device attributes for partial host atomics are already exposed via
DeviceProperties; the capability-query APIs and their enums are not exposed anywhere incuda.core. Natural consumers are dispatch layers (numba-cuda, cuda.compute, cuda.cccl)choosing between native atomics, CAS loops, or host fallbacks.
Underlying C APIs to cover
cuDeviceGetHostAtomicCapabilities,cuDeviceGetP2PAtomicCapabilities,CUatomicOperation,CUatomicOperationCapability,CU_DEVICE_P2P_ATTRIBUTE_ONLY_PARTIAL_NATIVE_ATOMIC_SUPPORTED,CU_DEVICE_ATTRIBUTE_ATOMIC_REDUCTION_SUPPORTED.Design sketch (draft — needs design-meeting review)
Important
Starting point only, not a settled design — review in the cuda.core design meeting.
StrEnum wrappers + mapping dicts following the
cuda.core.typingconventions; batch-in /batch-out mirroring the C API so N operations cost one driver call.
Open questions for the meeting:
IntFlag-style value per operation.Devicemethod vs. a property namespace (dev.properties-adjacent)?peer=kwarg vs. separate host/p2p methods.References
-- Leo's bot