diff --git a/cuda_bindings/cuda/bindings/_internal/_fast_enum.py b/cuda_bindings/cuda/bindings/_internal/_fast_enum.py new file mode 100644 index 0000000000..33e3b1e12f --- /dev/null +++ b/cuda_bindings/cuda/bindings/_internal/_fast_enum.py @@ -0,0 +1,76 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + + +# This code was automatically generated across versions from 12.9.1 to 13.1.1. Do not modify it directly. + + +""" +This is a replacement for the stdlib enum.IntEnum. + +Notably, it has much better import time performance, since it doesn't generate +and evaluate Python code at startup time. + +It supports the most important subset of the IntEnum API. See `test_enum` in +`cuda_bindings/tests/test_basics.py` for details. +""" + +from typing import Any, Iterator + + +class FastEnumMetaclass(type): + def __init__(cls, name, bases, namespace): + super().__init__(name, bases, namespace) + + cls.__singletons__ = {} + cls.__members__ = {} + for name, value in cls.__dict__.items(): + if name.startswith("__") and name.endswith("__"): + continue + + if isinstance(value, tuple): + value, doc = value + elif isinstance(value, int): + doc = None + else: + continue + + singleton = int.__new__(cls, value) + singleton.__doc__ = doc + singleton._name = name + cls.__singletons__[value] = singleton + cls.__members__[name] = singleton + + for name, member in cls.__members__.items(): + setattr(cls, name, member) + + def __repr__(cls) -> str: + return f"" + + def __len__(cls) -> int: + return len(cls.__members__) + + def __iter__(cls) -> Iterator["FastEnum"]: + return iter(cls.__members__.values()) + + def __contains__(cls, item: Any) -> bool: + return item in cls.__singletons__ + + +class FastEnum(int, metaclass=FastEnumMetaclass): + def __new__(cls, value: int) -> "FastEnum": + singleton: FastEnum = cls.__singletons__.get(value) + if singleton is None: + raise ValueError(f"{value} is not a valid {cls.__name__}") + return singleton + + def __repr__(self) -> str: + return f"<{self.__class__.__name__}.{self._name}: {int(self)}>" + + @property + def name(self) -> str: + return self._name + + @property + def value(self) -> int: + return int(self) diff --git a/cuda_bindings/cuda/bindings/_lib/utils.pxi.in b/cuda_bindings/cuda/bindings/_lib/utils.pxi.in index 910e758e5d..f4b75741bc 100644 --- a/cuda_bindings/cuda/bindings/_lib/utils.pxi.in +++ b/cuda_bindings/cuda/bindings/_lib/utils.pxi.in @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE from cpython.buffer cimport PyObject_CheckBuffer, PyObject_GetBuffer, PyBuffer_Release, PyBUF_SIMPLE, PyBUF_ANY_CONTIGUOUS @@ -6,7 +6,7 @@ from libc.stdlib cimport calloc, free from libc.stdint cimport int32_t, uint32_t, int64_t, uint64_t from libc.stddef cimport wchar_t from libc.string cimport memcpy -from enum import Enum as _Enum +from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum import ctypes as _ctypes cimport cuda.bindings.cydriver as cydriver cimport cuda.bindings._lib.param_packer as param_packer @@ -73,7 +73,7 @@ cdef class _HelperKernelParams: self._ckernelParams[idx] = value.getPtr() elif isinstance(value, (_ctypes.Structure)): self._ckernelParams[idx] = _ctypes.addressof(value) - elif isinstance(value, (_Enum)): + elif isinstance(value, (_FastEnum)): self._ckernelParams[idx] = &(self._ckernelParamsData[data_idx]) (self._ckernelParams[idx])[0] = value.value data_idx += sizeof(int) diff --git a/cuda_bindings/cuda/bindings/cufile.pyx b/cuda_bindings/cuda/bindings/cufile.pyx index 1aefa5c97b..1e6783a28d 100644 --- a/cuda_bindings/cuda/bindings/cufile.pyx +++ b/cuda_bindings/cuda/bindings/cufile.pyx @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # @@ -8,7 +8,7 @@ cimport cython # NOQA from libc cimport errno from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, nested_resource) -from enum import IntEnum as _IntEnum +from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum import cython @@ -2288,6 +2288,8 @@ cdef class StatsLevel2: def read_size_kb_hist(self, val): if self._readonly: raise ValueError("This StatsLevel2 instance is read-only") + if len(val) != 32: + raise ValueError(f"Expected length { 32 } for field read_size_kb_hist, got {len(val)}") cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint64) memcpy((&(self._ptr[0].read_size_kb_hist)), (arr.data), sizeof(uint64_t) * len(val)) @@ -2303,6 +2305,8 @@ cdef class StatsLevel2: def write_size_kb_hist(self, val): if self._readonly: raise ValueError("This StatsLevel2 instance is read-only") + if len(val) != 32: + raise ValueError(f"Expected length { 32 } for field write_size_kb_hist, got {len(val)}") cdef view.array arr = view.array(shape=(32,), itemsize=sizeof(uint64_t), format="Q", mode="c") arr[:] = _numpy.asarray(val, dtype=_numpy.uint64) memcpy((&(self._ptr[0].write_size_kb_hist)), (arr.data), sizeof(uint64_t) * len(val)) @@ -2441,7 +2445,7 @@ cdef class StatsLevel3: raise ValueError("This StatsLevel3 instance is read-only") cdef PerGpuStats val_ = val if len(val) != 16: - raise ValueError(f"Expected length 16 for field per_gpu_stats, got {len(val)}") + raise ValueError(f"Expected length { 16 } for field per_gpu_stats, got {len(val)}") memcpy(&(self._ptr[0].per_gpu_stats), (val_._get_ptr()), sizeof(CUfilePerGpuStats_t) * 16) @property @@ -2496,8 +2500,10 @@ cdef class StatsLevel3: # Enum ############################################################################### -class OpError(_IntEnum): - """See `CUfileOpError`.""" +class OpError(_FastEnum): + """ + See `CUfileOpError`. + """ SUCCESS = CU_FILE_SUCCESS DRIVER_NOT_INITIALIZED = CU_FILE_DRIVER_NOT_INITIALIZED DRIVER_INVALID_PROPS = CU_FILE_DRIVER_INVALID_PROPS @@ -2548,49 +2554,61 @@ class OpError(_IntEnum): BATCH_NOCOMPAT_ERROR = CU_FILE_BATCH_NOCOMPAT_ERROR IO_MAX_ERROR = CU_FILE_IO_MAX_ERROR -class DriverStatusFlags(_IntEnum): - """See `CUfileDriverStatusFlags_t`.""" - LUSTRE_SUPPORTED = CU_FILE_LUSTRE_SUPPORTED - WEKAFS_SUPPORTED = CU_FILE_WEKAFS_SUPPORTED - NFS_SUPPORTED = CU_FILE_NFS_SUPPORTED +class DriverStatusFlags(_FastEnum): + """ + See `CUfileDriverStatusFlags_t`. + """ + LUSTRE_SUPPORTED = (CU_FILE_LUSTRE_SUPPORTED, 'Support for DDN LUSTRE') + WEKAFS_SUPPORTED = (CU_FILE_WEKAFS_SUPPORTED, 'Support for WEKAFS') + NFS_SUPPORTED = (CU_FILE_NFS_SUPPORTED, 'Support for NFS') GPFS_SUPPORTED = CU_FILE_GPFS_SUPPORTED - NVME_SUPPORTED = CU_FILE_NVME_SUPPORTED - NVMEOF_SUPPORTED = CU_FILE_NVMEOF_SUPPORTED - SCSI_SUPPORTED = CU_FILE_SCSI_SUPPORTED - SCALEFLUX_CSD_SUPPORTED = CU_FILE_SCALEFLUX_CSD_SUPPORTED - NVMESH_SUPPORTED = CU_FILE_NVMESH_SUPPORTED - BEEGFS_SUPPORTED = CU_FILE_BEEGFS_SUPPORTED - NVME_P2P_SUPPORTED = CU_FILE_NVME_P2P_SUPPORTED - SCATEFS_SUPPORTED = CU_FILE_SCATEFS_SUPPORTED - VIRTIOFS_SUPPORTED = CU_FILE_VIRTIOFS_SUPPORTED - MAX_TARGET_TYPES = CU_FILE_MAX_TARGET_TYPES - -class DriverControlFlags(_IntEnum): - """See `CUfileDriverControlFlags_t`.""" - USE_POLL_MODE = CU_FILE_USE_POLL_MODE - ALLOW_COMPAT_MODE = CU_FILE_ALLOW_COMPAT_MODE - -class FeatureFlags(_IntEnum): - """See `CUfileFeatureFlags_t`.""" - DYN_ROUTING_SUPPORTED = CU_FILE_DYN_ROUTING_SUPPORTED - BATCH_IO_SUPPORTED = CU_FILE_BATCH_IO_SUPPORTED - STREAMS_SUPPORTED = CU_FILE_STREAMS_SUPPORTED - PARALLEL_IO_SUPPORTED = CU_FILE_PARALLEL_IO_SUPPORTED - P2P_SUPPORTED = CU_FILE_P2P_SUPPORTED - -class FileHandleType(_IntEnum): - """See `CUfileFileHandleType`.""" - OPAQUE_FD = CU_FILE_HANDLE_TYPE_OPAQUE_FD - OPAQUE_WIN32 = CU_FILE_HANDLE_TYPE_OPAQUE_WIN32 + NVME_SUPPORTED = (CU_FILE_NVME_SUPPORTED, '< Support for GPFS Support for NVMe') + NVMEOF_SUPPORTED = (CU_FILE_NVMEOF_SUPPORTED, 'Support for NVMeOF') + SCSI_SUPPORTED = (CU_FILE_SCSI_SUPPORTED, 'Support for SCSI') + SCALEFLUX_CSD_SUPPORTED = (CU_FILE_SCALEFLUX_CSD_SUPPORTED, 'Support for Scaleflux CSD') + NVMESH_SUPPORTED = (CU_FILE_NVMESH_SUPPORTED, 'Support for NVMesh Block Dev') + BEEGFS_SUPPORTED = (CU_FILE_BEEGFS_SUPPORTED, 'Support for BeeGFS') + NVME_P2P_SUPPORTED = (CU_FILE_NVME_P2P_SUPPORTED, 'Do not use this macro. This is deprecated now') + SCATEFS_SUPPORTED = (CU_FILE_SCATEFS_SUPPORTED, 'Support for ScateFS') + VIRTIOFS_SUPPORTED = (CU_FILE_VIRTIOFS_SUPPORTED, 'Support for VirtioFS') + MAX_TARGET_TYPES = (CU_FILE_MAX_TARGET_TYPES, 'Maximum FS supported') + +class DriverControlFlags(_FastEnum): + """ + See `CUfileDriverControlFlags_t`. + """ + USE_POLL_MODE = (CU_FILE_USE_POLL_MODE, 'use POLL mode. properties.use_poll_mode') + ALLOW_COMPAT_MODE = (CU_FILE_ALLOW_COMPAT_MODE, 'allow COMPATIBILITY mode. properties.allow_compat_mode') + +class FeatureFlags(_FastEnum): + """ + See `CUfileFeatureFlags_t`. + """ + DYN_ROUTING_SUPPORTED = (CU_FILE_DYN_ROUTING_SUPPORTED, 'Support for Dynamic routing to handle devices across the PCIe bridges') + BATCH_IO_SUPPORTED = (CU_FILE_BATCH_IO_SUPPORTED, 'Supported') + STREAMS_SUPPORTED = (CU_FILE_STREAMS_SUPPORTED, 'Supported') + PARALLEL_IO_SUPPORTED = (CU_FILE_PARALLEL_IO_SUPPORTED, 'Supported') + P2P_SUPPORTED = (CU_FILE_P2P_SUPPORTED, 'Support for PCI P2PDMA') + +class FileHandleType(_FastEnum): + """ + See `CUfileFileHandleType`. + """ + OPAQUE_FD = (CU_FILE_HANDLE_TYPE_OPAQUE_FD, 'Linux based fd') + OPAQUE_WIN32 = (CU_FILE_HANDLE_TYPE_OPAQUE_WIN32, 'Windows based handle (unsupported)') USERSPACE_FS = CU_FILE_HANDLE_TYPE_USERSPACE_FS -class Opcode(_IntEnum): - """See `CUfileOpcode_t`.""" +class Opcode(_FastEnum): + """ + See `CUfileOpcode_t`. + """ READ = CUFILE_READ WRITE = CUFILE_WRITE -class Status(_IntEnum): - """See `CUfileStatus_t`.""" +class Status(_FastEnum): + """ + See `CUfileStatus_t`. + """ WAITING = CUFILE_WAITING PENDING = CUFILE_PENDING INVALID = CUFILE_INVALID @@ -2599,12 +2617,16 @@ class Status(_IntEnum): TIMEOUT = CUFILE_TIMEOUT FAILED = CUFILE_FAILED -class BatchMode(_IntEnum): - """See `CUfileBatchMode_t`.""" +class BatchMode(_FastEnum): + """ + See `CUfileBatchMode_t`. + """ BATCH = CUFILE_BATCH -class SizeTConfigParameter(_IntEnum): - """See `CUFileSizeTConfigParameter_t`.""" +class SizeTConfigParameter(_FastEnum): + """ + See `CUFileSizeTConfigParameter_t`. + """ PROFILE_STATS = CUFILE_PARAM_PROFILE_STATS EXECUTION_MAX_IO_QUEUE_DEPTH = CUFILE_PARAM_EXECUTION_MAX_IO_QUEUE_DEPTH EXECUTION_MAX_IO_THREADS = CUFILE_PARAM_EXECUTION_MAX_IO_THREADS @@ -2618,8 +2640,10 @@ class SizeTConfigParameter(_IntEnum): POLLTHRESHOLD_SIZE_KB = CUFILE_PARAM_POLLTHRESHOLD_SIZE_KB PROPERTIES_BATCH_IO_TIMEOUT_MS = CUFILE_PARAM_PROPERTIES_BATCH_IO_TIMEOUT_MS -class BoolConfigParameter(_IntEnum): - """See `CUFileBoolConfigParameter_t`.""" +class BoolConfigParameter(_FastEnum): + """ + See `CUFileBoolConfigParameter_t`. + """ PROPERTIES_USE_POLL_MODE = CUFILE_PARAM_PROPERTIES_USE_POLL_MODE PROPERTIES_ALLOW_COMPAT_MODE = CUFILE_PARAM_PROPERTIES_ALLOW_COMPAT_MODE FORCE_COMPAT_MODE = CUFILE_PARAM_FORCE_COMPAT_MODE @@ -2633,24 +2657,30 @@ class BoolConfigParameter(_IntEnum): SKIP_TOPOLOGY_DETECTION = CUFILE_PARAM_SKIP_TOPOLOGY_DETECTION STREAM_MEMOPS_BYPASS = CUFILE_PARAM_STREAM_MEMOPS_BYPASS -class StringConfigParameter(_IntEnum): - """See `CUFileStringConfigParameter_t`.""" +class StringConfigParameter(_FastEnum): + """ + See `CUFileStringConfigParameter_t`. + """ LOGGING_LEVEL = CUFILE_PARAM_LOGGING_LEVEL ENV_LOGFILE_PATH = CUFILE_PARAM_ENV_LOGFILE_PATH LOG_DIR = CUFILE_PARAM_LOG_DIR -class ArrayConfigParameter(_IntEnum): - """See `CUFileArrayConfigParameter_t`.""" +class ArrayConfigParameter(_FastEnum): + """ + See `CUFileArrayConfigParameter_t`. + """ POSIX_POOL_SLAB_SIZE_KB = CUFILE_PARAM_POSIX_POOL_SLAB_SIZE_KB POSIX_POOL_SLAB_COUNT = CUFILE_PARAM_POSIX_POOL_SLAB_COUNT -class P2PFlags(_IntEnum): - """See `CUfileP2PFlags_t`.""" - P2PDMA = CUFILE_P2PDMA - NVFS = CUFILE_NVFS - DMABUF = CUFILE_DMABUF - C2C = CUFILE_C2C - NVIDIA_PEERMEM = CUFILE_NVIDIA_PEERMEM +class P2PFlags(_FastEnum): + """ + See `CUfileP2PFlags_t`. + """ + P2PDMA = (CUFILE_P2PDMA, 'Support for PCI P2PDMA') + NVFS = (CUFILE_NVFS, 'Support for nvidia-fs') + DMABUF = (CUFILE_DMABUF, 'Support for DMA Buffer') + C2C = (CUFILE_C2C, 'Support for Chip-to-Chip (Grace-based systems)') + NVIDIA_PEERMEM = (CUFILE_NVIDIA_PEERMEM, 'Only for IBM Spectrum Scale and WekaFS') ############################################################################### diff --git a/cuda_bindings/cuda/bindings/driver.pyx.in b/cuda_bindings/cuda/bindings/driver.pyx.in index 4e423a3c49..a3d90f7223 100644 --- a/cuda_bindings/cuda/bindings/driver.pyx.in +++ b/cuda_bindings/cuda/bindings/driver.pyx.in @@ -3,7 +3,6 @@ # This code was automatically generated with version 13.1.0. Do not modify it directly. from typing import Any, Optional -from enum import IntEnum import cython import ctypes from libc.stdlib cimport calloc, malloc, free @@ -14,6 +13,7 @@ from libc.limits cimport CHAR_MIN from libcpp.vector cimport vector from cpython.buffer cimport PyObject_CheckBuffer, PyObject_GetBuffer, PyBuffer_Release, PyBUF_SIMPLE, PyBUF_ANY_CONTIGUOUS from cpython.bytes cimport PyBytes_FromStringAndSize +from ._internal._fast_enum import FastEnum as _FastEnum import cuda.bindings.driver from libcpp.map cimport map @@ -349,251 +349,309 @@ CUDA_EGL_INFINITE_TIMEOUT = cydriver.CUDA_EGL_INFINITE_TIMEOUT {{if 'CUipcMem_flags_enum' in found_types}} -class CUipcMem_flags(IntEnum): +class CUipcMem_flags(_FastEnum): """ CUDA Ipc Mem Flags """ {{if 'CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS' in found_values}} - #: Automatically enable peer access between remote devices as needed - CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS = cydriver.CUipcMem_flags_enum.CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS{{endif}} + CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS = ( + cydriver.CUipcMem_flags_enum.CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS, + 'Automatically enable peer access between remote devices as needed\n' + ){{endif}} -_dict_CUipcMem_flags = dict(((int(v), v) for k, v in CUipcMem_flags.__members__.items())) {{endif}} {{if 'CUmemAttach_flags_enum' in found_types}} -class CUmemAttach_flags(IntEnum): +class CUmemAttach_flags(_FastEnum): """ CUDA Mem Attach Flags """ {{if 'CU_MEM_ATTACH_GLOBAL' in found_values}} - #: Memory can be accessed by any stream on any device - CU_MEM_ATTACH_GLOBAL = cydriver.CUmemAttach_flags_enum.CU_MEM_ATTACH_GLOBAL{{endif}} + CU_MEM_ATTACH_GLOBAL = ( + cydriver.CUmemAttach_flags_enum.CU_MEM_ATTACH_GLOBAL, + 'Memory can be accessed by any stream on any device\n' + ){{endif}} {{if 'CU_MEM_ATTACH_HOST' in found_values}} - #: Memory cannot be accessed by any stream on any device - CU_MEM_ATTACH_HOST = cydriver.CUmemAttach_flags_enum.CU_MEM_ATTACH_HOST{{endif}} + CU_MEM_ATTACH_HOST = ( + cydriver.CUmemAttach_flags_enum.CU_MEM_ATTACH_HOST, + 'Memory cannot be accessed by any stream on any device\n' + ){{endif}} {{if 'CU_MEM_ATTACH_SINGLE' in found_values}} - #: Memory can only be accessed by a single stream on the associated - #: device - CU_MEM_ATTACH_SINGLE = cydriver.CUmemAttach_flags_enum.CU_MEM_ATTACH_SINGLE{{endif}} + CU_MEM_ATTACH_SINGLE = ( + cydriver.CUmemAttach_flags_enum.CU_MEM_ATTACH_SINGLE, + 'Memory can only be accessed by a single stream on the associated device\n' + ){{endif}} -_dict_CUmemAttach_flags = dict(((int(v), v) for k, v in CUmemAttach_flags.__members__.items())) {{endif}} {{if 'CUctx_flags_enum' in found_types}} -class CUctx_flags(IntEnum): +class CUctx_flags(_FastEnum): """ Context creation flags """ {{if 'CU_CTX_SCHED_AUTO' in found_values}} - #: Automatic scheduling - CU_CTX_SCHED_AUTO = cydriver.CUctx_flags_enum.CU_CTX_SCHED_AUTO{{endif}} + CU_CTX_SCHED_AUTO = ( + cydriver.CUctx_flags_enum.CU_CTX_SCHED_AUTO, + 'Automatic scheduling\n' + ){{endif}} {{if 'CU_CTX_SCHED_SPIN' in found_values}} - #: Set spin as default scheduling - CU_CTX_SCHED_SPIN = cydriver.CUctx_flags_enum.CU_CTX_SCHED_SPIN{{endif}} + CU_CTX_SCHED_SPIN = ( + cydriver.CUctx_flags_enum.CU_CTX_SCHED_SPIN, + 'Set spin as default scheduling\n' + ){{endif}} {{if 'CU_CTX_SCHED_YIELD' in found_values}} - #: Set yield as default scheduling - CU_CTX_SCHED_YIELD = cydriver.CUctx_flags_enum.CU_CTX_SCHED_YIELD{{endif}} + CU_CTX_SCHED_YIELD = ( + cydriver.CUctx_flags_enum.CU_CTX_SCHED_YIELD, + 'Set yield as default scheduling\n' + ){{endif}} {{if 'CU_CTX_SCHED_BLOCKING_SYNC' in found_values}} - #: Set blocking synchronization as default scheduling - CU_CTX_SCHED_BLOCKING_SYNC = cydriver.CUctx_flags_enum.CU_CTX_SCHED_BLOCKING_SYNC{{endif}} + CU_CTX_SCHED_BLOCKING_SYNC = ( + cydriver.CUctx_flags_enum.CU_CTX_SCHED_BLOCKING_SYNC, + 'Set blocking synchronization as default scheduling\n' + ){{endif}} {{if 'CU_CTX_BLOCKING_SYNC' in found_values}} - #: Set blocking synchronization as default scheduling [Deprecated] - CU_CTX_BLOCKING_SYNC = cydriver.CUctx_flags_enum.CU_CTX_BLOCKING_SYNC{{endif}} + CU_CTX_BLOCKING_SYNC = ( + cydriver.CUctx_flags_enum.CU_CTX_BLOCKING_SYNC, + 'Set blocking synchronization as default scheduling [Deprecated]\n' + ){{endif}} {{if 'CU_CTX_SCHED_MASK' in found_values}} CU_CTX_SCHED_MASK = cydriver.CUctx_flags_enum.CU_CTX_SCHED_MASK{{endif}} {{if 'CU_CTX_MAP_HOST' in found_values}} - #: [Deprecated] - CU_CTX_MAP_HOST = cydriver.CUctx_flags_enum.CU_CTX_MAP_HOST{{endif}} + CU_CTX_MAP_HOST = ( + cydriver.CUctx_flags_enum.CU_CTX_MAP_HOST, + '[Deprecated]\n' + ){{endif}} {{if 'CU_CTX_LMEM_RESIZE_TO_MAX' in found_values}} - #: Keep local memory allocation after launch - CU_CTX_LMEM_RESIZE_TO_MAX = cydriver.CUctx_flags_enum.CU_CTX_LMEM_RESIZE_TO_MAX{{endif}} + CU_CTX_LMEM_RESIZE_TO_MAX = ( + cydriver.CUctx_flags_enum.CU_CTX_LMEM_RESIZE_TO_MAX, + 'Keep local memory allocation after launch\n' + ){{endif}} {{if 'CU_CTX_COREDUMP_ENABLE' in found_values}} - #: Trigger coredumps from exceptions in this context - CU_CTX_COREDUMP_ENABLE = cydriver.CUctx_flags_enum.CU_CTX_COREDUMP_ENABLE{{endif}} + CU_CTX_COREDUMP_ENABLE = ( + cydriver.CUctx_flags_enum.CU_CTX_COREDUMP_ENABLE, + 'Trigger coredumps from exceptions in this context\n' + ){{endif}} {{if 'CU_CTX_USER_COREDUMP_ENABLE' in found_values}} - #: Enable user pipe to trigger coredumps in this context - CU_CTX_USER_COREDUMP_ENABLE = cydriver.CUctx_flags_enum.CU_CTX_USER_COREDUMP_ENABLE{{endif}} + CU_CTX_USER_COREDUMP_ENABLE = ( + cydriver.CUctx_flags_enum.CU_CTX_USER_COREDUMP_ENABLE, + 'Enable user pipe to trigger coredumps in this context\n' + ){{endif}} {{if 'CU_CTX_SYNC_MEMOPS' in found_values}} - #: Ensure synchronous memory operations on this context will - #: synchronize - CU_CTX_SYNC_MEMOPS = cydriver.CUctx_flags_enum.CU_CTX_SYNC_MEMOPS{{endif}} + CU_CTX_SYNC_MEMOPS = ( + cydriver.CUctx_flags_enum.CU_CTX_SYNC_MEMOPS, + 'Ensure synchronous memory operations on this context will synchronize\n' + ){{endif}} {{if 'CU_CTX_FLAGS_MASK' in found_values}} CU_CTX_FLAGS_MASK = cydriver.CUctx_flags_enum.CU_CTX_FLAGS_MASK{{endif}} -_dict_CUctx_flags = dict(((int(v), v) for k, v in CUctx_flags.__members__.items())) {{endif}} {{if 'CUevent_sched_flags_enum' in found_types}} -class CUevent_sched_flags(IntEnum): +class CUevent_sched_flags(_FastEnum): """ Event sched flags """ {{if 'CU_EVENT_SCHED_AUTO' in found_values}} - #: Automatic scheduling - CU_EVENT_SCHED_AUTO = cydriver.CUevent_sched_flags_enum.CU_EVENT_SCHED_AUTO{{endif}} + CU_EVENT_SCHED_AUTO = ( + cydriver.CUevent_sched_flags_enum.CU_EVENT_SCHED_AUTO, + 'Automatic scheduling\n' + ){{endif}} {{if 'CU_EVENT_SCHED_SPIN' in found_values}} - #: Set spin as default scheduling - CU_EVENT_SCHED_SPIN = cydriver.CUevent_sched_flags_enum.CU_EVENT_SCHED_SPIN{{endif}} + CU_EVENT_SCHED_SPIN = ( + cydriver.CUevent_sched_flags_enum.CU_EVENT_SCHED_SPIN, + 'Set spin as default scheduling\n' + ){{endif}} {{if 'CU_EVENT_SCHED_YIELD' in found_values}} - #: Set yield as default scheduling - CU_EVENT_SCHED_YIELD = cydriver.CUevent_sched_flags_enum.CU_EVENT_SCHED_YIELD{{endif}} + CU_EVENT_SCHED_YIELD = ( + cydriver.CUevent_sched_flags_enum.CU_EVENT_SCHED_YIELD, + 'Set yield as default scheduling\n' + ){{endif}} {{if 'CU_EVENT_SCHED_BLOCKING_SYNC' in found_values}} - #: Set blocking synchronization as default scheduling - CU_EVENT_SCHED_BLOCKING_SYNC = cydriver.CUevent_sched_flags_enum.CU_EVENT_SCHED_BLOCKING_SYNC{{endif}} + CU_EVENT_SCHED_BLOCKING_SYNC = ( + cydriver.CUevent_sched_flags_enum.CU_EVENT_SCHED_BLOCKING_SYNC, + 'Set blocking synchronization as default scheduling\n' + ){{endif}} -_dict_CUevent_sched_flags = dict(((int(v), v) for k, v in CUevent_sched_flags.__members__.items())) {{endif}} {{if 'cl_event_flags_enum' in found_types}} -class cl_event_flags(IntEnum): +class cl_event_flags(_FastEnum): """ NVCL event scheduling flags """ {{if 'NVCL_EVENT_SCHED_AUTO' in found_values}} - #: Automatic scheduling - NVCL_EVENT_SCHED_AUTO = cydriver.cl_event_flags_enum.NVCL_EVENT_SCHED_AUTO{{endif}} + NVCL_EVENT_SCHED_AUTO = ( + cydriver.cl_event_flags_enum.NVCL_EVENT_SCHED_AUTO, + 'Automatic scheduling\n' + ){{endif}} {{if 'NVCL_EVENT_SCHED_SPIN' in found_values}} - #: Set spin as default scheduling - NVCL_EVENT_SCHED_SPIN = cydriver.cl_event_flags_enum.NVCL_EVENT_SCHED_SPIN{{endif}} + NVCL_EVENT_SCHED_SPIN = ( + cydriver.cl_event_flags_enum.NVCL_EVENT_SCHED_SPIN, + 'Set spin as default scheduling\n' + ){{endif}} {{if 'NVCL_EVENT_SCHED_YIELD' in found_values}} - #: Set yield as default scheduling - NVCL_EVENT_SCHED_YIELD = cydriver.cl_event_flags_enum.NVCL_EVENT_SCHED_YIELD{{endif}} + NVCL_EVENT_SCHED_YIELD = ( + cydriver.cl_event_flags_enum.NVCL_EVENT_SCHED_YIELD, + 'Set yield as default scheduling\n' + ){{endif}} {{if 'NVCL_EVENT_SCHED_BLOCKING_SYNC' in found_values}} - #: Set blocking synchronization as default scheduling - NVCL_EVENT_SCHED_BLOCKING_SYNC = cydriver.cl_event_flags_enum.NVCL_EVENT_SCHED_BLOCKING_SYNC{{endif}} + NVCL_EVENT_SCHED_BLOCKING_SYNC = ( + cydriver.cl_event_flags_enum.NVCL_EVENT_SCHED_BLOCKING_SYNC, + 'Set blocking synchronization as default scheduling\n' + ){{endif}} -_dict_cl_event_flags = dict(((int(v), v) for k, v in cl_event_flags.__members__.items())) {{endif}} {{if 'cl_context_flags_enum' in found_types}} -class cl_context_flags(IntEnum): +class cl_context_flags(_FastEnum): """ NVCL context scheduling flags """ {{if 'NVCL_CTX_SCHED_AUTO' in found_values}} - #: Automatic scheduling - NVCL_CTX_SCHED_AUTO = cydriver.cl_context_flags_enum.NVCL_CTX_SCHED_AUTO{{endif}} + NVCL_CTX_SCHED_AUTO = ( + cydriver.cl_context_flags_enum.NVCL_CTX_SCHED_AUTO, + 'Automatic scheduling\n' + ){{endif}} {{if 'NVCL_CTX_SCHED_SPIN' in found_values}} - #: Set spin as default scheduling - NVCL_CTX_SCHED_SPIN = cydriver.cl_context_flags_enum.NVCL_CTX_SCHED_SPIN{{endif}} + NVCL_CTX_SCHED_SPIN = ( + cydriver.cl_context_flags_enum.NVCL_CTX_SCHED_SPIN, + 'Set spin as default scheduling\n' + ){{endif}} {{if 'NVCL_CTX_SCHED_YIELD' in found_values}} - #: Set yield as default scheduling - NVCL_CTX_SCHED_YIELD = cydriver.cl_context_flags_enum.NVCL_CTX_SCHED_YIELD{{endif}} + NVCL_CTX_SCHED_YIELD = ( + cydriver.cl_context_flags_enum.NVCL_CTX_SCHED_YIELD, + 'Set yield as default scheduling\n' + ){{endif}} {{if 'NVCL_CTX_SCHED_BLOCKING_SYNC' in found_values}} - #: Set blocking synchronization as default scheduling - NVCL_CTX_SCHED_BLOCKING_SYNC = cydriver.cl_context_flags_enum.NVCL_CTX_SCHED_BLOCKING_SYNC{{endif}} + NVCL_CTX_SCHED_BLOCKING_SYNC = ( + cydriver.cl_context_flags_enum.NVCL_CTX_SCHED_BLOCKING_SYNC, + 'Set blocking synchronization as default scheduling\n' + ){{endif}} -_dict_cl_context_flags = dict(((int(v), v) for k, v in cl_context_flags.__members__.items())) {{endif}} {{if 'CUstream_flags_enum' in found_types}} -class CUstream_flags(IntEnum): +class CUstream_flags(_FastEnum): """ Stream creation flags """ {{if 'CU_STREAM_DEFAULT' in found_values}} - #: Default stream flag - CU_STREAM_DEFAULT = cydriver.CUstream_flags_enum.CU_STREAM_DEFAULT{{endif}} + CU_STREAM_DEFAULT = ( + cydriver.CUstream_flags_enum.CU_STREAM_DEFAULT, + 'Default stream flag\n' + ){{endif}} {{if 'CU_STREAM_NON_BLOCKING' in found_values}} - #: Stream does not synchronize with stream 0 (the NULL stream) - CU_STREAM_NON_BLOCKING = cydriver.CUstream_flags_enum.CU_STREAM_NON_BLOCKING{{endif}} + CU_STREAM_NON_BLOCKING = ( + cydriver.CUstream_flags_enum.CU_STREAM_NON_BLOCKING, + 'Stream does not synchronize with stream 0 (the NULL stream)\n' + ){{endif}} -_dict_CUstream_flags = dict(((int(v), v) for k, v in CUstream_flags.__members__.items())) {{endif}} {{if 'CUevent_flags_enum' in found_types}} -class CUevent_flags(IntEnum): +class CUevent_flags(_FastEnum): """ Event creation flags """ {{if 'CU_EVENT_DEFAULT' in found_values}} - #: Default event flag - CU_EVENT_DEFAULT = cydriver.CUevent_flags_enum.CU_EVENT_DEFAULT{{endif}} + CU_EVENT_DEFAULT = ( + cydriver.CUevent_flags_enum.CU_EVENT_DEFAULT, + 'Default event flag\n' + ){{endif}} {{if 'CU_EVENT_BLOCKING_SYNC' in found_values}} - #: Event uses blocking synchronization - CU_EVENT_BLOCKING_SYNC = cydriver.CUevent_flags_enum.CU_EVENT_BLOCKING_SYNC{{endif}} + CU_EVENT_BLOCKING_SYNC = ( + cydriver.CUevent_flags_enum.CU_EVENT_BLOCKING_SYNC, + 'Event uses blocking synchronization\n' + ){{endif}} {{if 'CU_EVENT_DISABLE_TIMING' in found_values}} - #: Event will not record timing data - CU_EVENT_DISABLE_TIMING = cydriver.CUevent_flags_enum.CU_EVENT_DISABLE_TIMING{{endif}} + CU_EVENT_DISABLE_TIMING = ( + cydriver.CUevent_flags_enum.CU_EVENT_DISABLE_TIMING, + 'Event will not record timing data\n' + ){{endif}} {{if 'CU_EVENT_INTERPROCESS' in found_values}} - #: Event is suitable for interprocess use. CU_EVENT_DISABLE_TIMING must - #: be set - CU_EVENT_INTERPROCESS = cydriver.CUevent_flags_enum.CU_EVENT_INTERPROCESS{{endif}} + CU_EVENT_INTERPROCESS = ( + cydriver.CUevent_flags_enum.CU_EVENT_INTERPROCESS, + 'Event is suitable for interprocess use. CU_EVENT_DISABLE_TIMING must be set\n' + ){{endif}} -_dict_CUevent_flags = dict(((int(v), v) for k, v in CUevent_flags.__members__.items())) {{endif}} {{if 'CUevent_record_flags_enum' in found_types}} -class CUevent_record_flags(IntEnum): +class CUevent_record_flags(_FastEnum): """ Event record flags """ {{if 'CU_EVENT_RECORD_DEFAULT' in found_values}} - #: Default event record flag - CU_EVENT_RECORD_DEFAULT = cydriver.CUevent_record_flags_enum.CU_EVENT_RECORD_DEFAULT{{endif}} + CU_EVENT_RECORD_DEFAULT = ( + cydriver.CUevent_record_flags_enum.CU_EVENT_RECORD_DEFAULT, + 'Default event record flag\n' + ){{endif}} {{if 'CU_EVENT_RECORD_EXTERNAL' in found_values}} - #: When using stream capture, create an event record node instead of - #: the default behavior. This flag is invalid when used outside of - #: capture. - CU_EVENT_RECORD_EXTERNAL = cydriver.CUevent_record_flags_enum.CU_EVENT_RECORD_EXTERNAL{{endif}} + CU_EVENT_RECORD_EXTERNAL = ( + cydriver.CUevent_record_flags_enum.CU_EVENT_RECORD_EXTERNAL, + 'When using stream capture, create an event record node instead of the\n' + 'default behavior. This flag is invalid when used outside of capture.\n' + ){{endif}} -_dict_CUevent_record_flags = dict(((int(v), v) for k, v in CUevent_record_flags.__members__.items())) {{endif}} {{if 'CUevent_wait_flags_enum' in found_types}} -class CUevent_wait_flags(IntEnum): +class CUevent_wait_flags(_FastEnum): """ Event wait flags """ {{if 'CU_EVENT_WAIT_DEFAULT' in found_values}} - #: Default event wait flag - CU_EVENT_WAIT_DEFAULT = cydriver.CUevent_wait_flags_enum.CU_EVENT_WAIT_DEFAULT{{endif}} + CU_EVENT_WAIT_DEFAULT = ( + cydriver.CUevent_wait_flags_enum.CU_EVENT_WAIT_DEFAULT, + 'Default event wait flag\n' + ){{endif}} {{if 'CU_EVENT_WAIT_EXTERNAL' in found_values}} - #: When using stream capture, create an event wait node instead of the - #: default behavior. This flag is invalid when used outside of capture. - CU_EVENT_WAIT_EXTERNAL = cydriver.CUevent_wait_flags_enum.CU_EVENT_WAIT_EXTERNAL{{endif}} + CU_EVENT_WAIT_EXTERNAL = ( + cydriver.CUevent_wait_flags_enum.CU_EVENT_WAIT_EXTERNAL, + 'When using stream capture, create an event wait node instead of the default\n' + 'behavior. This flag is invalid when used outside of capture.\n' + ){{endif}} -_dict_CUevent_wait_flags = dict(((int(v), v) for k, v in CUevent_wait_flags.__members__.items())) {{endif}} {{if 'CUatomicOperation_enum' in found_types}} -class CUatomicOperation(IntEnum): +class CUatomicOperation(_FastEnum): """ CUDA-valid Atomic Operations """ @@ -626,11 +684,10 @@ class CUatomicOperation(IntEnum): {{if 'CU_ATOMIC_OPERATION_MAX' in found_values}} CU_ATOMIC_OPERATION_MAX = cydriver.CUatomicOperation_enum.CU_ATOMIC_OPERATION_MAX{{endif}} -_dict_CUatomicOperation = dict(((int(v), v) for k, v in CUatomicOperation.__members__.items())) {{endif}} {{if 'CUatomicOperationCapability_enum' in found_types}} -class CUatomicOperationCapability(IntEnum): +class CUatomicOperationCapability(_FastEnum): """ CUDA-valid Atomic Operation capabilities """ @@ -649,154 +706,184 @@ class CUatomicOperationCapability(IntEnum): {{if 'CU_ATOMIC_CAPABILITY_VECTOR_32x4' in found_values}} CU_ATOMIC_CAPABILITY_VECTOR_32x4 = cydriver.CUatomicOperationCapability_enum.CU_ATOMIC_CAPABILITY_VECTOR_32x4{{endif}} -_dict_CUatomicOperationCapability = dict(((int(v), v) for k, v in CUatomicOperationCapability.__members__.items())) {{endif}} {{if 'CUstreamWaitValue_flags_enum' in found_types}} -class CUstreamWaitValue_flags(IntEnum): +class CUstreamWaitValue_flags(_FastEnum): """ Flags for :py:obj:`~.cuStreamWaitValue32` and :py:obj:`~.cuStreamWaitValue64` """ {{if 'CU_STREAM_WAIT_VALUE_GEQ' in found_values}} - #: Wait until (int32_t)(*addr - value) >= 0 (or int64_t for 64 bit - #: values). Note this is a cyclic comparison which ignores wraparound. - #: (Default behavior.) - CU_STREAM_WAIT_VALUE_GEQ = cydriver.CUstreamWaitValue_flags_enum.CU_STREAM_WAIT_VALUE_GEQ{{endif}} + CU_STREAM_WAIT_VALUE_GEQ = ( + cydriver.CUstreamWaitValue_flags_enum.CU_STREAM_WAIT_VALUE_GEQ, + 'Wait until (int32_t)(*addr - value) >= 0 (or int64_t for 64 bit values).\n' + 'Note this is a cyclic comparison which ignores wraparound. (Default\n' + 'behavior.)\n' + ){{endif}} {{if 'CU_STREAM_WAIT_VALUE_EQ' in found_values}} - #: Wait until *addr == value. - CU_STREAM_WAIT_VALUE_EQ = cydriver.CUstreamWaitValue_flags_enum.CU_STREAM_WAIT_VALUE_EQ{{endif}} + CU_STREAM_WAIT_VALUE_EQ = ( + cydriver.CUstreamWaitValue_flags_enum.CU_STREAM_WAIT_VALUE_EQ, + 'Wait until *addr == value.\n' + ){{endif}} {{if 'CU_STREAM_WAIT_VALUE_AND' in found_values}} - #: Wait until (*addr & value) != 0. - CU_STREAM_WAIT_VALUE_AND = cydriver.CUstreamWaitValue_flags_enum.CU_STREAM_WAIT_VALUE_AND{{endif}} + CU_STREAM_WAIT_VALUE_AND = ( + cydriver.CUstreamWaitValue_flags_enum.CU_STREAM_WAIT_VALUE_AND, + 'Wait until (*addr & value) != 0.\n' + ){{endif}} {{if 'CU_STREAM_WAIT_VALUE_NOR' in found_values}} - #: Wait until ~(*addr | value) != 0. Support for this operation can be - #: queried with :py:obj:`~.cuDeviceGetAttribute()` and - #: :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR`. - CU_STREAM_WAIT_VALUE_NOR = cydriver.CUstreamWaitValue_flags_enum.CU_STREAM_WAIT_VALUE_NOR{{endif}} + CU_STREAM_WAIT_VALUE_NOR = ( + cydriver.CUstreamWaitValue_flags_enum.CU_STREAM_WAIT_VALUE_NOR, + 'Wait until ~(*addr | value) != 0. Support for this operation can be queried\n' + 'with :py:obj:`~.cuDeviceGetAttribute()` and\n' + ':py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR`.\n' + ){{endif}} {{if 'CU_STREAM_WAIT_VALUE_FLUSH' in found_values}} - #: Follow the wait operation with a flush of outstanding remote writes. - #: This means that, if a remote write operation is guaranteed to have - #: reached the device before the wait can be satisfied, that write is - #: guaranteed to be visible to downstream device work. The device is - #: permitted to reorder remote writes internally. For example, this - #: flag would be required if two remote writes arrive in a defined - #: order, the wait is satisfied by the second write, and downstream - #: work needs to observe the first write. Support for this operation is - #: restricted to selected platforms and can be queried with - #: :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES`. - CU_STREAM_WAIT_VALUE_FLUSH = cydriver.CUstreamWaitValue_flags_enum.CU_STREAM_WAIT_VALUE_FLUSH{{endif}} + CU_STREAM_WAIT_VALUE_FLUSH = ( + cydriver.CUstreamWaitValue_flags_enum.CU_STREAM_WAIT_VALUE_FLUSH, + 'Follow the wait operation with a flush of outstanding remote writes. This\n' + 'means that, if a remote write operation is guaranteed to have reached the\n' + 'device before the wait can be satisfied, that write is guaranteed to be\n' + 'visible to downstream device work. The device is permitted to reorder\n' + 'remote writes internally. For example, this flag would be required if two\n' + 'remote writes arrive in a defined order, the wait is satisfied by the\n' + 'second write, and downstream work needs to observe the first write. Support\n' + 'for this operation is restricted to selected platforms and can be queried\n' + 'with :py:obj:`~.CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES`.\n' + ){{endif}} -_dict_CUstreamWaitValue_flags = dict(((int(v), v) for k, v in CUstreamWaitValue_flags.__members__.items())) {{endif}} {{if 'CUstreamWriteValue_flags_enum' in found_types}} -class CUstreamWriteValue_flags(IntEnum): +class CUstreamWriteValue_flags(_FastEnum): """ Flags for :py:obj:`~.cuStreamWriteValue32` """ {{if 'CU_STREAM_WRITE_VALUE_DEFAULT' in found_values}} - #: Default behavior - CU_STREAM_WRITE_VALUE_DEFAULT = cydriver.CUstreamWriteValue_flags_enum.CU_STREAM_WRITE_VALUE_DEFAULT{{endif}} + CU_STREAM_WRITE_VALUE_DEFAULT = ( + cydriver.CUstreamWriteValue_flags_enum.CU_STREAM_WRITE_VALUE_DEFAULT, + 'Default behavior\n' + ){{endif}} {{if 'CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER' in found_values}} - #: Permits the write to be reordered with writes which were issued - #: before it, as a performance optimization. Normally, - #: :py:obj:`~.cuStreamWriteValue32` will provide a memory fence before - #: the write, which has similar semantics to __threadfence_system() but - #: is scoped to the stream rather than a CUDA thread. This flag is not - #: supported in the v2 API. - CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER = cydriver.CUstreamWriteValue_flags_enum.CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER{{endif}} + CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER = ( + cydriver.CUstreamWriteValue_flags_enum.CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER, + 'Permits the write to be reordered with writes which were issued before it,\n' + 'as a performance optimization. Normally, :py:obj:`~.cuStreamWriteValue32`\n' + 'will provide a memory fence before the write, which has similar semantics\n' + 'to __threadfence_system() but is scoped to the stream rather than a CUDA\n' + 'thread. This flag is not supported in the v2 API.\n' + ){{endif}} -_dict_CUstreamWriteValue_flags = dict(((int(v), v) for k, v in CUstreamWriteValue_flags.__members__.items())) {{endif}} {{if 'CUstreamBatchMemOpType_enum' in found_types}} -class CUstreamBatchMemOpType(IntEnum): +class CUstreamBatchMemOpType(_FastEnum): """ Operations for :py:obj:`~.cuStreamBatchMemOp` """ {{if 'CU_STREAM_MEM_OP_WAIT_VALUE_32' in found_values}} - #: Represents a :py:obj:`~.cuStreamWaitValue32` operation - CU_STREAM_MEM_OP_WAIT_VALUE_32 = cydriver.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_WAIT_VALUE_32{{endif}} + CU_STREAM_MEM_OP_WAIT_VALUE_32 = ( + cydriver.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_WAIT_VALUE_32, + 'Represents a :py:obj:`~.cuStreamWaitValue32` operation\n' + ){{endif}} {{if 'CU_STREAM_MEM_OP_WRITE_VALUE_32' in found_values}} - #: Represents a :py:obj:`~.cuStreamWriteValue32` operation - CU_STREAM_MEM_OP_WRITE_VALUE_32 = cydriver.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_WRITE_VALUE_32{{endif}} + CU_STREAM_MEM_OP_WRITE_VALUE_32 = ( + cydriver.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_WRITE_VALUE_32, + 'Represents a :py:obj:`~.cuStreamWriteValue32` operation\n' + ){{endif}} {{if 'CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES' in found_values}} - #: This has the same effect as :py:obj:`~.CU_STREAM_WAIT_VALUE_FLUSH`, - #: but as a standalone operation. - CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES = cydriver.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES{{endif}} + CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES = ( + cydriver.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES, + 'This has the same effect as :py:obj:`~.CU_STREAM_WAIT_VALUE_FLUSH`, but as\n' + 'a standalone operation.\n' + ){{endif}} {{if 'CU_STREAM_MEM_OP_WAIT_VALUE_64' in found_values}} - #: Represents a :py:obj:`~.cuStreamWaitValue64` operation - CU_STREAM_MEM_OP_WAIT_VALUE_64 = cydriver.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_WAIT_VALUE_64{{endif}} + CU_STREAM_MEM_OP_WAIT_VALUE_64 = ( + cydriver.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_WAIT_VALUE_64, + 'Represents a :py:obj:`~.cuStreamWaitValue64` operation\n' + ){{endif}} {{if 'CU_STREAM_MEM_OP_WRITE_VALUE_64' in found_values}} - #: Represents a :py:obj:`~.cuStreamWriteValue64` operation - CU_STREAM_MEM_OP_WRITE_VALUE_64 = cydriver.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_WRITE_VALUE_64{{endif}} + CU_STREAM_MEM_OP_WRITE_VALUE_64 = ( + cydriver.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_WRITE_VALUE_64, + 'Represents a :py:obj:`~.cuStreamWriteValue64` operation\n' + ){{endif}} {{if 'CU_STREAM_MEM_OP_BARRIER' in found_values}} - #: Insert a memory barrier of the specified type - CU_STREAM_MEM_OP_BARRIER = cydriver.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_BARRIER{{endif}} + CU_STREAM_MEM_OP_BARRIER = ( + cydriver.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_BARRIER, + 'Insert a memory barrier of the specified type\n' + ){{endif}} {{if 'CU_STREAM_MEM_OP_ATOMIC_REDUCTION' in found_values}} - #: Perform a atomic reduction. See - #: :py:obj:`~.CUstreamBatchMemOpParams`::atomicReduction - CU_STREAM_MEM_OP_ATOMIC_REDUCTION = cydriver.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_ATOMIC_REDUCTION{{endif}} + CU_STREAM_MEM_OP_ATOMIC_REDUCTION = ( + cydriver.CUstreamBatchMemOpType_enum.CU_STREAM_MEM_OP_ATOMIC_REDUCTION, + 'Perform a atomic reduction. See\n' + ':py:obj:`~.CUstreamBatchMemOpParams`::atomicReduction\n' + ){{endif}} -_dict_CUstreamBatchMemOpType = dict(((int(v), v) for k, v in CUstreamBatchMemOpType.__members__.items())) {{endif}} {{if 'CUstreamMemoryBarrier_flags_enum' in found_types}} -class CUstreamMemoryBarrier_flags(IntEnum): +class CUstreamMemoryBarrier_flags(_FastEnum): """ Flags for :py:obj:`~.CUstreamBatchMemOpParams.memoryBarrier` """ {{if 'CU_STREAM_MEMORY_BARRIER_TYPE_SYS' in found_values}} - #: System-wide memory barrier. - CU_STREAM_MEMORY_BARRIER_TYPE_SYS = cydriver.CUstreamMemoryBarrier_flags_enum.CU_STREAM_MEMORY_BARRIER_TYPE_SYS{{endif}} + CU_STREAM_MEMORY_BARRIER_TYPE_SYS = ( + cydriver.CUstreamMemoryBarrier_flags_enum.CU_STREAM_MEMORY_BARRIER_TYPE_SYS, + 'System-wide memory barrier.\n' + ){{endif}} {{if 'CU_STREAM_MEMORY_BARRIER_TYPE_GPU' in found_values}} - #: Limit memory barrier scope to the GPU. - CU_STREAM_MEMORY_BARRIER_TYPE_GPU = cydriver.CUstreamMemoryBarrier_flags_enum.CU_STREAM_MEMORY_BARRIER_TYPE_GPU{{endif}} + CU_STREAM_MEMORY_BARRIER_TYPE_GPU = ( + cydriver.CUstreamMemoryBarrier_flags_enum.CU_STREAM_MEMORY_BARRIER_TYPE_GPU, + 'Limit memory barrier scope to the GPU.\n' + ){{endif}} -_dict_CUstreamMemoryBarrier_flags = dict(((int(v), v) for k, v in CUstreamMemoryBarrier_flags.__members__.items())) {{endif}} {{if 'CUstreamAtomicReductionOpType_enum' in found_types}} -class CUstreamAtomicReductionOpType(IntEnum): +class CUstreamAtomicReductionOpType(_FastEnum): """ Atomic reduction operation types for :py:obj:`~.CUstreamBatchMemOpParams`::atomicReduction::reductionOp """ {{if 'CU_STREAM_ATOMIC_REDUCTION_OP_ADD' in found_values}} - #: Performs an atomic ADD: *(address) = *(address) + value - CU_STREAM_ATOMIC_REDUCTION_OP_ADD = cydriver.CUstreamAtomicReductionOpType_enum.CU_STREAM_ATOMIC_REDUCTION_OP_ADD{{endif}} + CU_STREAM_ATOMIC_REDUCTION_OP_ADD = ( + cydriver.CUstreamAtomicReductionOpType_enum.CU_STREAM_ATOMIC_REDUCTION_OP_ADD, + 'Performs an atomic ADD: *(address) = *(address) + value\n' + ){{endif}} {{if 'CU_STREAM_ATOMIC_REDUCTION_OP_AND' in found_values}} - #: Performs an atomic AND: *(address) = *(address) & value - CU_STREAM_ATOMIC_REDUCTION_OP_AND = cydriver.CUstreamAtomicReductionOpType_enum.CU_STREAM_ATOMIC_REDUCTION_OP_AND{{endif}} + CU_STREAM_ATOMIC_REDUCTION_OP_AND = ( + cydriver.CUstreamAtomicReductionOpType_enum.CU_STREAM_ATOMIC_REDUCTION_OP_AND, + 'Performs an atomic AND: *(address) = *(address) & value\n' + ){{endif}} {{if 'CU_STREAM_ATOMIC_REDUCTION_OP_OR' in found_values}} - #: Performs an atomic OR: *(address) = *(address) | value - CU_STREAM_ATOMIC_REDUCTION_OP_OR = cydriver.CUstreamAtomicReductionOpType_enum.CU_STREAM_ATOMIC_REDUCTION_OP_OR{{endif}} + CU_STREAM_ATOMIC_REDUCTION_OP_OR = ( + cydriver.CUstreamAtomicReductionOpType_enum.CU_STREAM_ATOMIC_REDUCTION_OP_OR, + 'Performs an atomic OR: *(address) = *(address) | value\n' + ){{endif}} -_dict_CUstreamAtomicReductionOpType = dict(((int(v), v) for k, v in CUstreamAtomicReductionOpType.__members__.items())) {{endif}} {{if 'CUstreamAtomicReductionDataType_enum' in found_types}} -class CUstreamAtomicReductionDataType(IntEnum): +class CUstreamAtomicReductionDataType(_FastEnum): """ Atomic reduction data types for :py:obj:`~.CUstreamBatchMemOpParams`::atomicReduction::dataType @@ -806,2041 +893,2707 @@ class CUstreamAtomicReductionDataType(IntEnum): {{if 'CU_STREAM_ATOMIC_REDUCTION_UNSIGNED_64' in found_values}} CU_STREAM_ATOMIC_REDUCTION_UNSIGNED_64 = cydriver.CUstreamAtomicReductionDataType_enum.CU_STREAM_ATOMIC_REDUCTION_UNSIGNED_64{{endif}} -_dict_CUstreamAtomicReductionDataType = dict(((int(v), v) for k, v in CUstreamAtomicReductionDataType.__members__.items())) {{endif}} {{if 'CUoccupancy_flags_enum' in found_types}} -class CUoccupancy_flags(IntEnum): +class CUoccupancy_flags(_FastEnum): """ Occupancy calculator flag """ {{if 'CU_OCCUPANCY_DEFAULT' in found_values}} - #: Default behavior - CU_OCCUPANCY_DEFAULT = cydriver.CUoccupancy_flags_enum.CU_OCCUPANCY_DEFAULT{{endif}} + CU_OCCUPANCY_DEFAULT = ( + cydriver.CUoccupancy_flags_enum.CU_OCCUPANCY_DEFAULT, + 'Default behavior\n' + ){{endif}} {{if 'CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE' in found_values}} - #: Assume global caching is enabled and cannot be automatically turned - #: off - CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE = cydriver.CUoccupancy_flags_enum.CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE{{endif}} + CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE = ( + cydriver.CUoccupancy_flags_enum.CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE, + 'Assume global caching is enabled and cannot be automatically turned off\n' + ){{endif}} -_dict_CUoccupancy_flags = dict(((int(v), v) for k, v in CUoccupancy_flags.__members__.items())) {{endif}} {{if 'CUstreamUpdateCaptureDependencies_flags_enum' in found_types}} -class CUstreamUpdateCaptureDependencies_flags(IntEnum): +class CUstreamUpdateCaptureDependencies_flags(_FastEnum): """ Flags for :py:obj:`~.cuStreamUpdateCaptureDependencies` """ {{if 'CU_STREAM_ADD_CAPTURE_DEPENDENCIES' in found_values}} - #: Add new nodes to the dependency set - CU_STREAM_ADD_CAPTURE_DEPENDENCIES = cydriver.CUstreamUpdateCaptureDependencies_flags_enum.CU_STREAM_ADD_CAPTURE_DEPENDENCIES{{endif}} + CU_STREAM_ADD_CAPTURE_DEPENDENCIES = ( + cydriver.CUstreamUpdateCaptureDependencies_flags_enum.CU_STREAM_ADD_CAPTURE_DEPENDENCIES, + 'Add new nodes to the dependency set\n' + ){{endif}} {{if 'CU_STREAM_SET_CAPTURE_DEPENDENCIES' in found_values}} - #: Replace the dependency set with the new nodes - CU_STREAM_SET_CAPTURE_DEPENDENCIES = cydriver.CUstreamUpdateCaptureDependencies_flags_enum.CU_STREAM_SET_CAPTURE_DEPENDENCIES{{endif}} + CU_STREAM_SET_CAPTURE_DEPENDENCIES = ( + cydriver.CUstreamUpdateCaptureDependencies_flags_enum.CU_STREAM_SET_CAPTURE_DEPENDENCIES, + 'Replace the dependency set with the new nodes\n' + ){{endif}} -_dict_CUstreamUpdateCaptureDependencies_flags = dict(((int(v), v) for k, v in CUstreamUpdateCaptureDependencies_flags.__members__.items())) {{endif}} {{if 'CUasyncNotificationType_enum' in found_types}} -class CUasyncNotificationType(IntEnum): +class CUasyncNotificationType(_FastEnum): """ Types of async notification that can be sent """ {{if 'CU_ASYNC_NOTIFICATION_TYPE_OVER_BUDGET' in found_values}} - #: Sent when the process has exceeded its device memory budget - CU_ASYNC_NOTIFICATION_TYPE_OVER_BUDGET = cydriver.CUasyncNotificationType_enum.CU_ASYNC_NOTIFICATION_TYPE_OVER_BUDGET{{endif}} + CU_ASYNC_NOTIFICATION_TYPE_OVER_BUDGET = ( + cydriver.CUasyncNotificationType_enum.CU_ASYNC_NOTIFICATION_TYPE_OVER_BUDGET, + 'Sent when the process has exceeded its device memory budget\n' + ){{endif}} -_dict_CUasyncNotificationType = dict(((int(v), v) for k, v in CUasyncNotificationType.__members__.items())) {{endif}} {{if 'CUarray_format_enum' in found_types}} -class CUarray_format(IntEnum): +class CUarray_format(_FastEnum): """ Array formats """ {{if 'CU_AD_FORMAT_UNSIGNED_INT8' in found_values}} - #: Unsigned 8-bit integers - CU_AD_FORMAT_UNSIGNED_INT8 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8{{endif}} + CU_AD_FORMAT_UNSIGNED_INT8 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT8, + 'Unsigned 8-bit integers\n' + ){{endif}} {{if 'CU_AD_FORMAT_UNSIGNED_INT16' in found_values}} - #: Unsigned 16-bit integers - CU_AD_FORMAT_UNSIGNED_INT16 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16{{endif}} + CU_AD_FORMAT_UNSIGNED_INT16 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT16, + 'Unsigned 16-bit integers\n' + ){{endif}} {{if 'CU_AD_FORMAT_UNSIGNED_INT32' in found_values}} - #: Unsigned 32-bit integers - CU_AD_FORMAT_UNSIGNED_INT32 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32{{endif}} + CU_AD_FORMAT_UNSIGNED_INT32 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_UNSIGNED_INT32, + 'Unsigned 32-bit integers\n' + ){{endif}} {{if 'CU_AD_FORMAT_SIGNED_INT8' in found_values}} - #: Signed 8-bit integers - CU_AD_FORMAT_SIGNED_INT8 = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8{{endif}} + CU_AD_FORMAT_SIGNED_INT8 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8, + 'Signed 8-bit integers\n' + ){{endif}} {{if 'CU_AD_FORMAT_SIGNED_INT16' in found_values}} - #: Signed 16-bit integers - CU_AD_FORMAT_SIGNED_INT16 = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16{{endif}} + CU_AD_FORMAT_SIGNED_INT16 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT16, + 'Signed 16-bit integers\n' + ){{endif}} {{if 'CU_AD_FORMAT_SIGNED_INT32' in found_values}} - #: Signed 32-bit integers - CU_AD_FORMAT_SIGNED_INT32 = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32{{endif}} + CU_AD_FORMAT_SIGNED_INT32 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT32, + 'Signed 32-bit integers\n' + ){{endif}} {{if 'CU_AD_FORMAT_HALF' in found_values}} - #: 16-bit floating point - CU_AD_FORMAT_HALF = cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF{{endif}} + CU_AD_FORMAT_HALF = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_HALF, + '16-bit floating point\n' + ){{endif}} {{if 'CU_AD_FORMAT_FLOAT' in found_values}} - #: 32-bit floating point - CU_AD_FORMAT_FLOAT = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT{{endif}} + CU_AD_FORMAT_FLOAT = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT, + '32-bit floating point\n' + ){{endif}} {{if 'CU_AD_FORMAT_UNORM_INT_101010_2' in found_values}} - #: 4 channel unorm R10G10B10A2 RGB format - CU_AD_FORMAT_UNORM_INT_101010_2 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT_101010_2{{endif}} + CU_AD_FORMAT_UNORM_INT_101010_2 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT_101010_2, + '4 channel unorm R10G10B10A2 RGB format\n' + ){{endif}} {{if 'CU_AD_FORMAT_UINT8_PACKED_422' in found_values}} - #: 4 channel unsigned 8-bit YUV packed format, with 4:2:2 sampling - CU_AD_FORMAT_UINT8_PACKED_422 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT8_PACKED_422{{endif}} + CU_AD_FORMAT_UINT8_PACKED_422 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT8_PACKED_422, + '4 channel unsigned 8-bit YUV packed format, with 4:2:2 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_UINT8_PACKED_444' in found_values}} - #: 4 channel unsigned 8-bit YUV packed format, with 4:4:4 sampling - CU_AD_FORMAT_UINT8_PACKED_444 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT8_PACKED_444{{endif}} + CU_AD_FORMAT_UINT8_PACKED_444 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT8_PACKED_444, + '4 channel unsigned 8-bit YUV packed format, with 4:4:4 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_UINT8_SEMIPLANAR_420' in found_values}} - #: 3 channel unsigned 8-bit YUV semi-planar format, with 4:2:0 sampling - CU_AD_FORMAT_UINT8_SEMIPLANAR_420 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT8_SEMIPLANAR_420{{endif}} + CU_AD_FORMAT_UINT8_SEMIPLANAR_420 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT8_SEMIPLANAR_420, + '3 channel unsigned 8-bit YUV semi-planar format, with 4:2:0 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_UINT16_SEMIPLANAR_420' in found_values}} - #: 3 channel unsigned 16-bit YUV semi-planar format, with 4:2:0 - #: sampling - CU_AD_FORMAT_UINT16_SEMIPLANAR_420 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT16_SEMIPLANAR_420{{endif}} + CU_AD_FORMAT_UINT16_SEMIPLANAR_420 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT16_SEMIPLANAR_420, + '3 channel unsigned 16-bit YUV semi-planar format, with 4:2:0 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_UINT8_SEMIPLANAR_422' in found_values}} - #: 3 channel unsigned 8-bit YUV semi-planar format, with 4:2:2 sampling - CU_AD_FORMAT_UINT8_SEMIPLANAR_422 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT8_SEMIPLANAR_422{{endif}} + CU_AD_FORMAT_UINT8_SEMIPLANAR_422 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT8_SEMIPLANAR_422, + '3 channel unsigned 8-bit YUV semi-planar format, with 4:2:2 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_UINT16_SEMIPLANAR_422' in found_values}} - #: 3 channel unsigned 16-bit YUV semi-planar format, with 4:2:2 - #: sampling - CU_AD_FORMAT_UINT16_SEMIPLANAR_422 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT16_SEMIPLANAR_422{{endif}} + CU_AD_FORMAT_UINT16_SEMIPLANAR_422 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT16_SEMIPLANAR_422, + '3 channel unsigned 16-bit YUV semi-planar format, with 4:2:2 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_UINT8_SEMIPLANAR_444' in found_values}} - #: 3 channel unsigned 8-bit YUV semi-planar format, with 4:4:4 sampling - CU_AD_FORMAT_UINT8_SEMIPLANAR_444 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT8_SEMIPLANAR_444{{endif}} + CU_AD_FORMAT_UINT8_SEMIPLANAR_444 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT8_SEMIPLANAR_444, + '3 channel unsigned 8-bit YUV semi-planar format, with 4:4:4 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_UINT16_SEMIPLANAR_444' in found_values}} - #: 3 channel unsigned 16-bit YUV semi-planar format, with 4:4:4 - #: sampling - CU_AD_FORMAT_UINT16_SEMIPLANAR_444 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT16_SEMIPLANAR_444{{endif}} + CU_AD_FORMAT_UINT16_SEMIPLANAR_444 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT16_SEMIPLANAR_444, + '3 channel unsigned 16-bit YUV semi-planar format, with 4:4:4 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_UINT8_PLANAR_420' in found_values}} - #: 3 channel unsigned 8-bit YUV planar format, with 4:2:0 sampling - CU_AD_FORMAT_UINT8_PLANAR_420 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT8_PLANAR_420{{endif}} + CU_AD_FORMAT_UINT8_PLANAR_420 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT8_PLANAR_420, + '3 channel unsigned 8-bit YUV planar format, with 4:2:0 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_UINT16_PLANAR_420' in found_values}} - #: 3 channel unsigned 16-bit YUV planar format, with 4:2:0 sampling - CU_AD_FORMAT_UINT16_PLANAR_420 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT16_PLANAR_420{{endif}} + CU_AD_FORMAT_UINT16_PLANAR_420 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT16_PLANAR_420, + '3 channel unsigned 16-bit YUV planar format, with 4:2:0 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_UINT8_PLANAR_422' in found_values}} - #: 3 channel unsigned 8-bit YUV planar format, with 4:2:2 sampling - CU_AD_FORMAT_UINT8_PLANAR_422 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT8_PLANAR_422{{endif}} + CU_AD_FORMAT_UINT8_PLANAR_422 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT8_PLANAR_422, + '3 channel unsigned 8-bit YUV planar format, with 4:2:2 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_UINT16_PLANAR_422' in found_values}} - #: 3 channel unsigned 16-bit YUV planar format, with 4:2:2 sampling - CU_AD_FORMAT_UINT16_PLANAR_422 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT16_PLANAR_422{{endif}} + CU_AD_FORMAT_UINT16_PLANAR_422 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT16_PLANAR_422, + '3 channel unsigned 16-bit YUV planar format, with 4:2:2 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_UINT8_PLANAR_444' in found_values}} - #: 3 channel unsigned 8-bit YUV planar format, with 4:4:4 sampling - CU_AD_FORMAT_UINT8_PLANAR_444 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT8_PLANAR_444{{endif}} + CU_AD_FORMAT_UINT8_PLANAR_444 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT8_PLANAR_444, + '3 channel unsigned 8-bit YUV planar format, with 4:4:4 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_UINT16_PLANAR_444' in found_values}} - #: 3 channel unsigned 16-bit YUV planar format, with 4:4:4 sampling - CU_AD_FORMAT_UINT16_PLANAR_444 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT16_PLANAR_444{{endif}} + CU_AD_FORMAT_UINT16_PLANAR_444 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_UINT16_PLANAR_444, + '3 channel unsigned 16-bit YUV planar format, with 4:4:4 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_BC1_UNORM' in found_values}} - #: 4 channel unsigned normalized block-compressed (BC1 compression) - #: format - CU_AD_FORMAT_BC1_UNORM = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM{{endif}} + CU_AD_FORMAT_BC1_UNORM = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM, + '4 channel unsigned normalized block-compressed (BC1 compression) format\n' + ){{endif}} {{if 'CU_AD_FORMAT_BC1_UNORM_SRGB' in found_values}} - #: 4 channel unsigned normalized block-compressed (BC1 compression) - #: format with sRGB encoding - CU_AD_FORMAT_BC1_UNORM_SRGB = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM_SRGB{{endif}} + CU_AD_FORMAT_BC1_UNORM_SRGB = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_BC1_UNORM_SRGB, + '4 channel unsigned normalized block-compressed (BC1 compression) format\n' + 'with sRGB encoding\n' + ){{endif}} {{if 'CU_AD_FORMAT_BC2_UNORM' in found_values}} - #: 4 channel unsigned normalized block-compressed (BC2 compression) - #: format - CU_AD_FORMAT_BC2_UNORM = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM{{endif}} + CU_AD_FORMAT_BC2_UNORM = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM, + '4 channel unsigned normalized block-compressed (BC2 compression) format\n' + ){{endif}} {{if 'CU_AD_FORMAT_BC2_UNORM_SRGB' in found_values}} - #: 4 channel unsigned normalized block-compressed (BC2 compression) - #: format with sRGB encoding - CU_AD_FORMAT_BC2_UNORM_SRGB = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM_SRGB{{endif}} + CU_AD_FORMAT_BC2_UNORM_SRGB = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_BC2_UNORM_SRGB, + '4 channel unsigned normalized block-compressed (BC2 compression) format\n' + 'with sRGB encoding\n' + ){{endif}} {{if 'CU_AD_FORMAT_BC3_UNORM' in found_values}} - #: 4 channel unsigned normalized block-compressed (BC3 compression) - #: format - CU_AD_FORMAT_BC3_UNORM = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM{{endif}} + CU_AD_FORMAT_BC3_UNORM = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM, + '4 channel unsigned normalized block-compressed (BC3 compression) format\n' + ){{endif}} {{if 'CU_AD_FORMAT_BC3_UNORM_SRGB' in found_values}} - #: 4 channel unsigned normalized block-compressed (BC3 compression) - #: format with sRGB encoding - CU_AD_FORMAT_BC3_UNORM_SRGB = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM_SRGB{{endif}} + CU_AD_FORMAT_BC3_UNORM_SRGB = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_BC3_UNORM_SRGB, + '4 channel unsigned normalized block-compressed (BC3 compression) format\n' + 'with sRGB encoding\n' + ){{endif}} {{if 'CU_AD_FORMAT_BC4_UNORM' in found_values}} - #: 1 channel unsigned normalized block-compressed (BC4 compression) - #: format - CU_AD_FORMAT_BC4_UNORM = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC4_UNORM{{endif}} + CU_AD_FORMAT_BC4_UNORM = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_BC4_UNORM, + '1 channel unsigned normalized block-compressed (BC4 compression) format\n' + ){{endif}} {{if 'CU_AD_FORMAT_BC4_SNORM' in found_values}} - #: 1 channel signed normalized block-compressed (BC4 compression) - #: format - CU_AD_FORMAT_BC4_SNORM = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC4_SNORM{{endif}} + CU_AD_FORMAT_BC4_SNORM = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_BC4_SNORM, + '1 channel signed normalized block-compressed (BC4 compression) format\n' + ){{endif}} {{if 'CU_AD_FORMAT_BC5_UNORM' in found_values}} - #: 2 channel unsigned normalized block-compressed (BC5 compression) - #: format - CU_AD_FORMAT_BC5_UNORM = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC5_UNORM{{endif}} + CU_AD_FORMAT_BC5_UNORM = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_BC5_UNORM, + '2 channel unsigned normalized block-compressed (BC5 compression) format\n' + ){{endif}} {{if 'CU_AD_FORMAT_BC5_SNORM' in found_values}} - #: 2 channel signed normalized block-compressed (BC5 compression) - #: format - CU_AD_FORMAT_BC5_SNORM = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC5_SNORM{{endif}} + CU_AD_FORMAT_BC5_SNORM = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_BC5_SNORM, + '2 channel signed normalized block-compressed (BC5 compression) format\n' + ){{endif}} {{if 'CU_AD_FORMAT_BC6H_UF16' in found_values}} - #: 3 channel unsigned half-float block-compressed (BC6H compression) - #: format - CU_AD_FORMAT_BC6H_UF16 = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC6H_UF16{{endif}} + CU_AD_FORMAT_BC6H_UF16 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_BC6H_UF16, + '3 channel unsigned half-float block-compressed (BC6H compression) format\n' + ){{endif}} {{if 'CU_AD_FORMAT_BC6H_SF16' in found_values}} - #: 3 channel signed half-float block-compressed (BC6H compression) - #: format - CU_AD_FORMAT_BC6H_SF16 = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC6H_SF16{{endif}} + CU_AD_FORMAT_BC6H_SF16 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_BC6H_SF16, + '3 channel signed half-float block-compressed (BC6H compression) format\n' + ){{endif}} {{if 'CU_AD_FORMAT_BC7_UNORM' in found_values}} - #: 4 channel unsigned normalized block-compressed (BC7 compression) - #: format - CU_AD_FORMAT_BC7_UNORM = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM{{endif}} + CU_AD_FORMAT_BC7_UNORM = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM, + '4 channel unsigned normalized block-compressed (BC7 compression) format\n' + ){{endif}} {{if 'CU_AD_FORMAT_BC7_UNORM_SRGB' in found_values}} - #: 4 channel unsigned normalized block-compressed (BC7 compression) - #: format with sRGB encoding - CU_AD_FORMAT_BC7_UNORM_SRGB = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM_SRGB{{endif}} + CU_AD_FORMAT_BC7_UNORM_SRGB = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM_SRGB, + '4 channel unsigned normalized block-compressed (BC7 compression) format\n' + 'with sRGB encoding\n' + ){{endif}} {{if 'CU_AD_FORMAT_P010' in found_values}} - #: 10-bit YUV planar format, with 4:2:0 sampling - CU_AD_FORMAT_P010 = cydriver.CUarray_format_enum.CU_AD_FORMAT_P010{{endif}} + CU_AD_FORMAT_P010 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_P010, + '10-bit YUV planar format, with 4:2:0 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_P016' in found_values}} - #: 16-bit YUV planar format, with 4:2:0 sampling - CU_AD_FORMAT_P016 = cydriver.CUarray_format_enum.CU_AD_FORMAT_P016{{endif}} + CU_AD_FORMAT_P016 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_P016, + '16-bit YUV planar format, with 4:2:0 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_NV16' in found_values}} - #: 8-bit YUV planar format, with 4:2:2 sampling - CU_AD_FORMAT_NV16 = cydriver.CUarray_format_enum.CU_AD_FORMAT_NV16{{endif}} + CU_AD_FORMAT_NV16 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_NV16, + '8-bit YUV planar format, with 4:2:2 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_P210' in found_values}} - #: 10-bit YUV planar format, with 4:2:2 sampling - CU_AD_FORMAT_P210 = cydriver.CUarray_format_enum.CU_AD_FORMAT_P210{{endif}} + CU_AD_FORMAT_P210 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_P210, + '10-bit YUV planar format, with 4:2:2 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_P216' in found_values}} - #: 16-bit YUV planar format, with 4:2:2 sampling - CU_AD_FORMAT_P216 = cydriver.CUarray_format_enum.CU_AD_FORMAT_P216{{endif}} + CU_AD_FORMAT_P216 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_P216, + '16-bit YUV planar format, with 4:2:2 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_YUY2' in found_values}} - #: 2 channel, 8-bit YUV packed planar format, with 4:2:2 sampling - CU_AD_FORMAT_YUY2 = cydriver.CUarray_format_enum.CU_AD_FORMAT_YUY2{{endif}} + CU_AD_FORMAT_YUY2 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_YUY2, + '2 channel, 8-bit YUV packed planar format, with 4:2:2 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_Y210' in found_values}} - #: 2 channel, 10-bit YUV packed planar format, with 4:2:2 sampling - CU_AD_FORMAT_Y210 = cydriver.CUarray_format_enum.CU_AD_FORMAT_Y210{{endif}} + CU_AD_FORMAT_Y210 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_Y210, + '2 channel, 10-bit YUV packed planar format, with 4:2:2 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_Y216' in found_values}} - #: 2 channel, 16-bit YUV packed planar format, with 4:2:2 sampling - CU_AD_FORMAT_Y216 = cydriver.CUarray_format_enum.CU_AD_FORMAT_Y216{{endif}} + CU_AD_FORMAT_Y216 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_Y216, + '2 channel, 16-bit YUV packed planar format, with 4:2:2 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_AYUV' in found_values}} - #: 4 channel, 8-bit YUV packed planar format, with 4:4:4 sampling - CU_AD_FORMAT_AYUV = cydriver.CUarray_format_enum.CU_AD_FORMAT_AYUV{{endif}} + CU_AD_FORMAT_AYUV = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_AYUV, + '4 channel, 8-bit YUV packed planar format, with 4:4:4 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_Y410' in found_values}} - #: 10-bit YUV packed planar format, with 4:4:4 sampling - CU_AD_FORMAT_Y410 = cydriver.CUarray_format_enum.CU_AD_FORMAT_Y410{{endif}} + CU_AD_FORMAT_Y410 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_Y410, + '10-bit YUV packed planar format, with 4:4:4 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_NV12' in found_values}} - #: 8-bit YUV planar format, with 4:2:0 sampling - CU_AD_FORMAT_NV12 = cydriver.CUarray_format_enum.CU_AD_FORMAT_NV12{{endif}} + CU_AD_FORMAT_NV12 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_NV12, + '8-bit YUV planar format, with 4:2:0 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_Y416' in found_values}} - #: 4 channel, 12-bit YUV packed planar format, with 4:4:4 sampling - CU_AD_FORMAT_Y416 = cydriver.CUarray_format_enum.CU_AD_FORMAT_Y416{{endif}} + CU_AD_FORMAT_Y416 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_Y416, + '4 channel, 12-bit YUV packed planar format, with 4:4:4 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_Y444_PLANAR8' in found_values}} - #: 3 channel 8-bit YUV planar format, with 4:4:4 sampling - CU_AD_FORMAT_Y444_PLANAR8 = cydriver.CUarray_format_enum.CU_AD_FORMAT_Y444_PLANAR8{{endif}} + CU_AD_FORMAT_Y444_PLANAR8 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_Y444_PLANAR8, + '3 channel 8-bit YUV planar format, with 4:4:4 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_Y444_PLANAR10' in found_values}} - #: 3 channel 10-bit YUV planar format, with 4:4:4 sampling - CU_AD_FORMAT_Y444_PLANAR10 = cydriver.CUarray_format_enum.CU_AD_FORMAT_Y444_PLANAR10{{endif}} + CU_AD_FORMAT_Y444_PLANAR10 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_Y444_PLANAR10, + '3 channel 10-bit YUV planar format, with 4:4:4 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_YUV444_8bit_SemiPlanar' in found_values}} - #: 3 channel 8-bit YUV semi-planar format, with 4:4:4 sampling - CU_AD_FORMAT_YUV444_8bit_SemiPlanar = cydriver.CUarray_format_enum.CU_AD_FORMAT_YUV444_8bit_SemiPlanar{{endif}} + CU_AD_FORMAT_YUV444_8bit_SemiPlanar = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_YUV444_8bit_SemiPlanar, + '3 channel 8-bit YUV semi-planar format, with 4:4:4 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_YUV444_16bit_SemiPlanar' in found_values}} - #: 3 channel 16-bit YUV semi-planar format, with 4:4:4 sampling - CU_AD_FORMAT_YUV444_16bit_SemiPlanar = cydriver.CUarray_format_enum.CU_AD_FORMAT_YUV444_16bit_SemiPlanar{{endif}} + CU_AD_FORMAT_YUV444_16bit_SemiPlanar = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_YUV444_16bit_SemiPlanar, + '3 channel 16-bit YUV semi-planar format, with 4:4:4 sampling\n' + ){{endif}} {{if 'CU_AD_FORMAT_UNORM_INT8X1' in found_values}} - #: 1 channel unsigned 8-bit normalized integer - CU_AD_FORMAT_UNORM_INT8X1 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT8X1{{endif}} + CU_AD_FORMAT_UNORM_INT8X1 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT8X1, + '1 channel unsigned 8-bit normalized integer\n' + ){{endif}} {{if 'CU_AD_FORMAT_UNORM_INT8X2' in found_values}} - #: 2 channel unsigned 8-bit normalized integer - CU_AD_FORMAT_UNORM_INT8X2 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT8X2{{endif}} + CU_AD_FORMAT_UNORM_INT8X2 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT8X2, + '2 channel unsigned 8-bit normalized integer\n' + ){{endif}} {{if 'CU_AD_FORMAT_UNORM_INT8X4' in found_values}} - #: 4 channel unsigned 8-bit normalized integer - CU_AD_FORMAT_UNORM_INT8X4 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT8X4{{endif}} + CU_AD_FORMAT_UNORM_INT8X4 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT8X4, + '4 channel unsigned 8-bit normalized integer\n' + ){{endif}} {{if 'CU_AD_FORMAT_UNORM_INT16X1' in found_values}} - #: 1 channel unsigned 16-bit normalized integer - CU_AD_FORMAT_UNORM_INT16X1 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT16X1{{endif}} + CU_AD_FORMAT_UNORM_INT16X1 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT16X1, + '1 channel unsigned 16-bit normalized integer\n' + ){{endif}} {{if 'CU_AD_FORMAT_UNORM_INT16X2' in found_values}} - #: 2 channel unsigned 16-bit normalized integer - CU_AD_FORMAT_UNORM_INT16X2 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT16X2{{endif}} + CU_AD_FORMAT_UNORM_INT16X2 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT16X2, + '2 channel unsigned 16-bit normalized integer\n' + ){{endif}} {{if 'CU_AD_FORMAT_UNORM_INT16X4' in found_values}} - #: 4 channel unsigned 16-bit normalized integer - CU_AD_FORMAT_UNORM_INT16X4 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT16X4{{endif}} + CU_AD_FORMAT_UNORM_INT16X4 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT16X4, + '4 channel unsigned 16-bit normalized integer\n' + ){{endif}} {{if 'CU_AD_FORMAT_SNORM_INT8X1' in found_values}} - #: 1 channel signed 8-bit normalized integer - CU_AD_FORMAT_SNORM_INT8X1 = cydriver.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT8X1{{endif}} + CU_AD_FORMAT_SNORM_INT8X1 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT8X1, + '1 channel signed 8-bit normalized integer\n' + ){{endif}} {{if 'CU_AD_FORMAT_SNORM_INT8X2' in found_values}} - #: 2 channel signed 8-bit normalized integer - CU_AD_FORMAT_SNORM_INT8X2 = cydriver.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT8X2{{endif}} + CU_AD_FORMAT_SNORM_INT8X2 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT8X2, + '2 channel signed 8-bit normalized integer\n' + ){{endif}} {{if 'CU_AD_FORMAT_SNORM_INT8X4' in found_values}} - #: 4 channel signed 8-bit normalized integer - CU_AD_FORMAT_SNORM_INT8X4 = cydriver.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT8X4{{endif}} + CU_AD_FORMAT_SNORM_INT8X4 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT8X4, + '4 channel signed 8-bit normalized integer\n' + ){{endif}} {{if 'CU_AD_FORMAT_SNORM_INT16X1' in found_values}} - #: 1 channel signed 16-bit normalized integer - CU_AD_FORMAT_SNORM_INT16X1 = cydriver.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT16X1{{endif}} + CU_AD_FORMAT_SNORM_INT16X1 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT16X1, + '1 channel signed 16-bit normalized integer\n' + ){{endif}} {{if 'CU_AD_FORMAT_SNORM_INT16X2' in found_values}} - #: 2 channel signed 16-bit normalized integer - CU_AD_FORMAT_SNORM_INT16X2 = cydriver.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT16X2{{endif}} + CU_AD_FORMAT_SNORM_INT16X2 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT16X2, + '2 channel signed 16-bit normalized integer\n' + ){{endif}} {{if 'CU_AD_FORMAT_SNORM_INT16X4' in found_values}} - #: 4 channel signed 16-bit normalized integer - CU_AD_FORMAT_SNORM_INT16X4 = cydriver.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT16X4{{endif}} + CU_AD_FORMAT_SNORM_INT16X4 = ( + cydriver.CUarray_format_enum.CU_AD_FORMAT_SNORM_INT16X4, + '4 channel signed 16-bit normalized integer\n' + ){{endif}} {{if 'CU_AD_FORMAT_MAX' in found_values}} CU_AD_FORMAT_MAX = cydriver.CUarray_format_enum.CU_AD_FORMAT_MAX{{endif}} -_dict_CUarray_format = dict(((int(v), v) for k, v in CUarray_format.__members__.items())) {{endif}} {{if 'CUaddress_mode_enum' in found_types}} -class CUaddress_mode(IntEnum): +class CUaddress_mode(_FastEnum): """ Texture reference addressing modes """ {{if 'CU_TR_ADDRESS_MODE_WRAP' in found_values}} - #: Wrapping address mode - CU_TR_ADDRESS_MODE_WRAP = cydriver.CUaddress_mode_enum.CU_TR_ADDRESS_MODE_WRAP{{endif}} + CU_TR_ADDRESS_MODE_WRAP = ( + cydriver.CUaddress_mode_enum.CU_TR_ADDRESS_MODE_WRAP, + 'Wrapping address mode\n' + ){{endif}} {{if 'CU_TR_ADDRESS_MODE_CLAMP' in found_values}} - #: Clamp to edge address mode - CU_TR_ADDRESS_MODE_CLAMP = cydriver.CUaddress_mode_enum.CU_TR_ADDRESS_MODE_CLAMP{{endif}} + CU_TR_ADDRESS_MODE_CLAMP = ( + cydriver.CUaddress_mode_enum.CU_TR_ADDRESS_MODE_CLAMP, + 'Clamp to edge address mode\n' + ){{endif}} {{if 'CU_TR_ADDRESS_MODE_MIRROR' in found_values}} - #: Mirror address mode - CU_TR_ADDRESS_MODE_MIRROR = cydriver.CUaddress_mode_enum.CU_TR_ADDRESS_MODE_MIRROR{{endif}} + CU_TR_ADDRESS_MODE_MIRROR = ( + cydriver.CUaddress_mode_enum.CU_TR_ADDRESS_MODE_MIRROR, + 'Mirror address mode\n' + ){{endif}} {{if 'CU_TR_ADDRESS_MODE_BORDER' in found_values}} - #: Border address mode - CU_TR_ADDRESS_MODE_BORDER = cydriver.CUaddress_mode_enum.CU_TR_ADDRESS_MODE_BORDER{{endif}} + CU_TR_ADDRESS_MODE_BORDER = ( + cydriver.CUaddress_mode_enum.CU_TR_ADDRESS_MODE_BORDER, + 'Border address mode\n' + ){{endif}} -_dict_CUaddress_mode = dict(((int(v), v) for k, v in CUaddress_mode.__members__.items())) {{endif}} {{if 'CUfilter_mode_enum' in found_types}} -class CUfilter_mode(IntEnum): +class CUfilter_mode(_FastEnum): """ Texture reference filtering modes """ {{if 'CU_TR_FILTER_MODE_POINT' in found_values}} - #: Point filter mode - CU_TR_FILTER_MODE_POINT = cydriver.CUfilter_mode_enum.CU_TR_FILTER_MODE_POINT{{endif}} + CU_TR_FILTER_MODE_POINT = ( + cydriver.CUfilter_mode_enum.CU_TR_FILTER_MODE_POINT, + 'Point filter mode\n' + ){{endif}} {{if 'CU_TR_FILTER_MODE_LINEAR' in found_values}} - #: Linear filter mode - CU_TR_FILTER_MODE_LINEAR = cydriver.CUfilter_mode_enum.CU_TR_FILTER_MODE_LINEAR{{endif}} + CU_TR_FILTER_MODE_LINEAR = ( + cydriver.CUfilter_mode_enum.CU_TR_FILTER_MODE_LINEAR, + 'Linear filter mode\n' + ){{endif}} -_dict_CUfilter_mode = dict(((int(v), v) for k, v in CUfilter_mode.__members__.items())) {{endif}} {{if 'CUdevice_attribute_enum' in found_types}} -class CUdevice_attribute(IntEnum): +class CUdevice_attribute(_FastEnum): """ Device properties """ {{if 'CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK' in found_values}} - #: Maximum number of threads per block - CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK{{endif}} + CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK, + 'Maximum number of threads per block\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X' in found_values}} - #: Maximum block dimension X - CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X{{endif}} + CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X, + 'Maximum block dimension X\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y' in found_values}} - #: Maximum block dimension Y - CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y{{endif}} + CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y, + 'Maximum block dimension Y\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z' in found_values}} - #: Maximum block dimension Z - CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z{{endif}} + CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z, + 'Maximum block dimension Z\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X' in found_values}} - #: Maximum grid dimension X - CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X{{endif}} + CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X, + 'Maximum grid dimension X\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y' in found_values}} - #: Maximum grid dimension Y - CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y{{endif}} + CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y, + 'Maximum grid dimension Y\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z' in found_values}} - #: Maximum grid dimension Z - CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z{{endif}} + CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z, + 'Maximum grid dimension Z\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK' in found_values}} - #: Maximum shared memory available per block in bytes - CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK{{endif}} + CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK, + 'Maximum shared memory available per block in bytes\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK' in found_values}} - #: Deprecated, use CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK - CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK{{endif}} + CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK, + 'Deprecated, use CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY' in found_values}} - #: Memory available on device for constant variables in a CUDA C kernel - #: in bytes - CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY{{endif}} + CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY, + 'Memory available on device for constant variables in a CUDA C kernel in\n' + 'bytes\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_WARP_SIZE' in found_values}} - #: Warp size in threads - CU_DEVICE_ATTRIBUTE_WARP_SIZE = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_WARP_SIZE{{endif}} + CU_DEVICE_ATTRIBUTE_WARP_SIZE = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_WARP_SIZE, + 'Warp size in threads\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAX_PITCH' in found_values}} - #: Maximum pitch in bytes allowed by memory copies - CU_DEVICE_ATTRIBUTE_MAX_PITCH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_PITCH{{endif}} + CU_DEVICE_ATTRIBUTE_MAX_PITCH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_PITCH, + 'Maximum pitch in bytes allowed by memory copies\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK' in found_values}} - #: Maximum number of 32-bit registers available per block - CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK{{endif}} + CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK, + 'Maximum number of 32-bit registers available per block\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK' in found_values}} - #: Deprecated, use CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK - CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK{{endif}} + CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK, + 'Deprecated, use CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_CLOCK_RATE' in found_values}} - #: Typical clock frequency in kilohertz - CU_DEVICE_ATTRIBUTE_CLOCK_RATE = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CLOCK_RATE{{endif}} + CU_DEVICE_ATTRIBUTE_CLOCK_RATE = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CLOCK_RATE, + 'Typical clock frequency in kilohertz\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT' in found_values}} - #: Alignment requirement for textures - CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT{{endif}} + CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT, + 'Alignment requirement for textures\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_GPU_OVERLAP' in found_values}} - #: Device can possibly copy memory and execute a kernel concurrently. - #: Deprecated. Use instead CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT. - CU_DEVICE_ATTRIBUTE_GPU_OVERLAP = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_OVERLAP{{endif}} + CU_DEVICE_ATTRIBUTE_GPU_OVERLAP = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_OVERLAP, + 'Device can possibly copy memory and execute a kernel concurrently.\n' + 'Deprecated. Use instead CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT' in found_values}} - #: Number of multiprocessors on device - CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT{{endif}} + CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT, + 'Number of multiprocessors on device\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT' in found_values}} - #: Specifies whether there is a run time limit on kernels - CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT{{endif}} + CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT, + 'Specifies whether there is a run time limit on kernels\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_INTEGRATED' in found_values}} - #: Device is integrated with host memory - CU_DEVICE_ATTRIBUTE_INTEGRATED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_INTEGRATED{{endif}} + CU_DEVICE_ATTRIBUTE_INTEGRATED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_INTEGRATED, + 'Device is integrated with host memory\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY' in found_values}} - #: Device can map host memory into CUDA address space - CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY{{endif}} + CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY, + 'Device can map host memory into CUDA address space\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_COMPUTE_MODE' in found_values}} - #: Compute mode (See :py:obj:`~.CUcomputemode` for details) - CU_DEVICE_ATTRIBUTE_COMPUTE_MODE = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_COMPUTE_MODE{{endif}} + CU_DEVICE_ATTRIBUTE_COMPUTE_MODE = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_COMPUTE_MODE, + 'Compute mode (See :py:obj:`~.CUcomputemode` for details)\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH' in found_values}} - #: Maximum 1D texture width - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH, + 'Maximum 1D texture width\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH' in found_values}} - #: Maximum 2D texture width - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH, + 'Maximum 2D texture width\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT' in found_values}} - #: Maximum 2D texture height - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT, + 'Maximum 2D texture height\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH' in found_values}} - #: Maximum 3D texture width - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH, + 'Maximum 3D texture width\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT' in found_values}} - #: Maximum 3D texture height - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT, + 'Maximum 3D texture height\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH' in found_values}} - #: Maximum 3D texture depth - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH, + 'Maximum 3D texture depth\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH' in found_values}} - #: Maximum 2D layered texture width - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH, + 'Maximum 2D layered texture width\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH' in found_values}} - #: Deprecated, use CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH, + 'Deprecated, use CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT' in found_values}} - #: Maximum 2D layered texture height - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT, + 'Maximum 2D layered texture height\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT' in found_values}} - #: Deprecated, use CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT, + 'Deprecated, use CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS' in found_values}} - #: Maximum layers in a 2D layered texture - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS, + 'Maximum layers in a 2D layered texture\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES' in found_values}} - #: Deprecated, use CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES, + 'Deprecated, use CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT' in found_values}} - #: Alignment requirement for surfaces - CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT{{endif}} + CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT, + 'Alignment requirement for surfaces\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS' in found_values}} - #: Device can possibly execute multiple kernels concurrently - CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS{{endif}} + CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS, + 'Device can possibly execute multiple kernels concurrently\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_ECC_ENABLED' in found_values}} - #: Device has ECC support enabled - CU_DEVICE_ATTRIBUTE_ECC_ENABLED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_ECC_ENABLED{{endif}} + CU_DEVICE_ATTRIBUTE_ECC_ENABLED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_ECC_ENABLED, + 'Device has ECC support enabled\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_PCI_BUS_ID' in found_values}} - #: PCI bus ID of the device - CU_DEVICE_ATTRIBUTE_PCI_BUS_ID = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_PCI_BUS_ID{{endif}} + CU_DEVICE_ATTRIBUTE_PCI_BUS_ID = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_PCI_BUS_ID, + 'PCI bus ID of the device\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID' in found_values}} - #: PCI device ID of the device - CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID{{endif}} + CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID, + 'PCI device ID of the device\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_TCC_DRIVER' in found_values}} - #: Device is using TCC driver model - CU_DEVICE_ATTRIBUTE_TCC_DRIVER = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_TCC_DRIVER{{endif}} + CU_DEVICE_ATTRIBUTE_TCC_DRIVER = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_TCC_DRIVER, + 'Device is using TCC driver model\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE' in found_values}} - #: Peak memory clock frequency in kilohertz - CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE{{endif}} + CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE, + 'Peak memory clock frequency in kilohertz\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH' in found_values}} - #: Global memory bus width in bits - CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH{{endif}} + CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH, + 'Global memory bus width in bits\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE' in found_values}} - #: Size of L2 cache in bytes - CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE{{endif}} + CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE, + 'Size of L2 cache in bytes\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR' in found_values}} - #: Maximum resident threads per multiprocessor - CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR{{endif}} + CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR, + 'Maximum resident threads per multiprocessor\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT' in found_values}} - #: Number of asynchronous engines - CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT{{endif}} + CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT, + 'Number of asynchronous engines\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING' in found_values}} - #: Device shares a unified address space with the host - CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING{{endif}} + CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING, + 'Device shares a unified address space with the host\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH' in found_values}} - #: Maximum 1D layered texture width - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH, + 'Maximum 1D layered texture width\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS' in found_values}} - #: Maximum layers in a 1D layered texture - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS, + 'Maximum layers in a 1D layered texture\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GATHER' in found_values}} - #: Deprecated, do not use. - CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GATHER = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GATHER{{endif}} + CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GATHER = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GATHER, + 'Deprecated, do not use.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH' in found_values}} - #: Maximum 2D texture width if CUDA_ARRAY3D_TEXTURE_GATHER is set - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH, + 'Maximum 2D texture width if CUDA_ARRAY3D_TEXTURE_GATHER is set\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT' in found_values}} - #: Maximum 2D texture height if CUDA_ARRAY3D_TEXTURE_GATHER is set - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT, + 'Maximum 2D texture height if CUDA_ARRAY3D_TEXTURE_GATHER is set\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE' in found_values}} - #: Alternate maximum 3D texture width - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE, + 'Alternate maximum 3D texture width\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE' in found_values}} - #: Alternate maximum 3D texture height - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE, + 'Alternate maximum 3D texture height\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE' in found_values}} - #: Alternate maximum 3D texture depth - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE, + 'Alternate maximum 3D texture depth\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID' in found_values}} - #: PCI domain ID of the device - CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID{{endif}} + CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID, + 'PCI domain ID of the device\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT' in found_values}} - #: Pitch alignment requirement for textures - CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT{{endif}} + CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT, + 'Pitch alignment requirement for textures\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH' in found_values}} - #: Maximum cubemap texture width/height - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH, + 'Maximum cubemap texture width/height\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH' in found_values}} - #: Maximum cubemap layered texture width/height - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH, + 'Maximum cubemap layered texture width/height\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS' in found_values}} - #: Maximum layers in a cubemap layered texture - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS, + 'Maximum layers in a cubemap layered texture\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH' in found_values}} - #: Maximum 1D surface width - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH, + 'Maximum 1D surface width\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH' in found_values}} - #: Maximum 2D surface width - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH, + 'Maximum 2D surface width\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT' in found_values}} - #: Maximum 2D surface height - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT, + 'Maximum 2D surface height\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH' in found_values}} - #: Maximum 3D surface width - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH, + 'Maximum 3D surface width\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT' in found_values}} - #: Maximum 3D surface height - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT, + 'Maximum 3D surface height\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH' in found_values}} - #: Maximum 3D surface depth - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH, + 'Maximum 3D surface depth\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH' in found_values}} - #: Maximum 1D layered surface width - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH, + 'Maximum 1D layered surface width\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS' in found_values}} - #: Maximum layers in a 1D layered surface - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS, + 'Maximum layers in a 1D layered surface\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH' in found_values}} - #: Maximum 2D layered surface width - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH, + 'Maximum 2D layered surface width\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT' in found_values}} - #: Maximum 2D layered surface height - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT, + 'Maximum 2D layered surface height\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS' in found_values}} - #: Maximum layers in a 2D layered surface - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS, + 'Maximum layers in a 2D layered surface\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH' in found_values}} - #: Maximum cubemap surface width - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH, + 'Maximum cubemap surface width\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH' in found_values}} - #: Maximum cubemap layered surface width - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH, + 'Maximum cubemap layered surface width\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS' in found_values}} - #: Maximum layers in a cubemap layered surface - CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS, + 'Maximum layers in a cubemap layered surface\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH' in found_values}} - #: Deprecated, do not use. Use cudaDeviceGetTexture1DLinearMaxWidth() - #: or :py:obj:`~.cuDeviceGetTexture1DLinearMaxWidth()` instead. - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH, + 'Deprecated, do not use. Use cudaDeviceGetTexture1DLinearMaxWidth() or\n' + ':py:obj:`~.cuDeviceGetTexture1DLinearMaxWidth()` instead.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH' in found_values}} - #: Maximum 2D linear texture width - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH, + 'Maximum 2D linear texture width\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT' in found_values}} - #: Maximum 2D linear texture height - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT, + 'Maximum 2D linear texture height\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH' in found_values}} - #: Maximum 2D linear texture pitch in bytes - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH, + 'Maximum 2D linear texture pitch in bytes\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH' in found_values}} - #: Maximum mipmapped 2D texture width - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH, + 'Maximum mipmapped 2D texture width\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT' in found_values}} - #: Maximum mipmapped 2D texture height - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT, + 'Maximum mipmapped 2D texture height\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR' in found_values}} - #: Major compute capability version number - CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR{{endif}} + CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR, + 'Major compute capability version number\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR' in found_values}} - #: Minor compute capability version number - CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR{{endif}} + CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR, + 'Minor compute capability version number\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH' in found_values}} - #: Maximum mipmapped 1D texture width - CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH{{endif}} + CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH, + 'Maximum mipmapped 1D texture width\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED' in found_values}} - #: Device supports stream priorities - CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED, + 'Device supports stream priorities\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED' in found_values}} - #: Device supports caching globals in L1 - CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED, + 'Device supports caching globals in L1\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED' in found_values}} - #: Device supports caching locals in L1 - CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED, + 'Device supports caching locals in L1\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR' in found_values}} - #: Maximum shared memory available per multiprocessor in bytes - CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR{{endif}} + CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR, + 'Maximum shared memory available per multiprocessor in bytes\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR' in found_values}} - #: Maximum number of 32-bit registers available per multiprocessor - CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR{{endif}} + CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR, + 'Maximum number of 32-bit registers available per multiprocessor\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY' in found_values}} - #: Device can allocate managed memory on this system - CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY{{endif}} + CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY, + 'Device can allocate managed memory on this system\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD' in found_values}} - #: Device is on a multi-GPU board - CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD{{endif}} + CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD, + 'Device is on a multi-GPU board\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID' in found_values}} - #: Unique id for a group of devices on the same multi-GPU board - CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID{{endif}} + CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID, + 'Unique id for a group of devices on the same multi-GPU board\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED' in found_values}} - #: Link between the device and the host supports all native atomic - #: operations - CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED, + 'Link between the device and the host supports all native atomic operations\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO' in found_values}} - #: Ratio of single precision performance (in floating-point operations - #: per second) to double precision performance - CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO{{endif}} + CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO, + 'Ratio of single precision performance (in floating-point operations per\n' + 'second) to double precision performance\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS' in found_values}} - #: Device supports coherently accessing pageable memory without calling - #: cudaHostRegister on it - CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS{{endif}} + CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS, + 'Device supports coherently accessing pageable memory without calling\n' + 'cudaHostRegister on it\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS' in found_values}} - #: Device can coherently access managed memory concurrently with the - #: CPU - CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS{{endif}} + CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS, + 'Device can coherently access managed memory concurrently with the CPU\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED' in found_values}} - #: Device supports compute preemption. - CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED, + 'Device supports compute preemption.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM' in found_values}} - #: Device can access host registered memory at the same virtual address - #: as the CPU - CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM{{endif}} + CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM, + 'Device can access host registered memory at the same virtual address as the\n' + 'CPU\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS_V1' in found_values}} - #: Deprecated, along with v1 MemOps API, :py:obj:`~.cuStreamBatchMemOp` - #: and related APIs are supported. - CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS_V1 = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS_V1{{endif}} + CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS_V1 = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS_V1, + 'Deprecated, along with v1 MemOps API, :py:obj:`~.cuStreamBatchMemOp` and\n' + 'related APIs are supported.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS_V1' in found_values}} - #: Deprecated, along with v1 MemOps API, 64-bit operations are - #: supported in :py:obj:`~.cuStreamBatchMemOp` and related APIs. - CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS_V1 = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS_V1{{endif}} + CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS_V1 = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS_V1, + 'Deprecated, along with v1 MemOps API, 64-bit operations are supported in\n' + ':py:obj:`~.cuStreamBatchMemOp` and related APIs.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR_V1' in found_values}} - #: Deprecated, along with v1 MemOps API, - #: :py:obj:`~.CU_STREAM_WAIT_VALUE_NOR` is supported. - CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR_V1 = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR_V1{{endif}} + CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR_V1 = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR_V1, + 'Deprecated, along with v1 MemOps API, :py:obj:`~.CU_STREAM_WAIT_VALUE_NOR`\n' + 'is supported.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH' in found_values}} - #: Device supports launching cooperative kernels via - #: :py:obj:`~.cuLaunchCooperativeKernel` - CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH{{endif}} + CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH, + 'Device supports launching cooperative kernels via\n' + ':py:obj:`~.cuLaunchCooperativeKernel`\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH' in found_values}} - #: Deprecated, :py:obj:`~.cuLaunchCooperativeKernelMultiDevice` is - #: deprecated. - CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH{{endif}} + CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH, + 'Deprecated, :py:obj:`~.cuLaunchCooperativeKernelMultiDevice` is deprecated.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN' in found_values}} - #: Maximum optin shared memory per block - CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN{{endif}} + CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN, + 'Maximum optin shared memory per block\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES' in found_values}} - #: The :py:obj:`~.CU_STREAM_WAIT_VALUE_FLUSH` flag and the - #: :py:obj:`~.CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES` MemOp are supported - #: on the device. See :py:obj:`~.Stream Memory Operations` for - #: additional details. - CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES{{endif}} + CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES, + 'The :py:obj:`~.CU_STREAM_WAIT_VALUE_FLUSH` flag and the\n' + ':py:obj:`~.CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES` MemOp are supported on the\n' + 'device. See :py:obj:`~.Stream Memory Operations` for additional details.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED' in found_values}} - #: Device supports host memory registration via - #: :py:obj:`~.cudaHostRegister`. - CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED, + 'Device supports host memory registration via :py:obj:`~.cudaHostRegister`.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES' in found_values}} - #: Device accesses pageable memory via the host's page tables. - CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES{{endif}} + CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES, + "Device accesses pageable memory via the host's page tables.\n" + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST' in found_values}} - #: The host can directly access managed memory on the device without - #: migration. - CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST{{endif}} + CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST, + 'The host can directly access managed memory on the device without\n' + 'migration.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED' in found_values}} - #: Deprecated, Use - #: CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED - CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED, + 'Deprecated, Use CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED' in found_values}} - #: Device supports virtual memory management APIs like - #: :py:obj:`~.cuMemAddressReserve`, :py:obj:`~.cuMemCreate`, - #: :py:obj:`~.cuMemMap` and related APIs - CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED, + 'Device supports virtual memory management APIs like\n' + ':py:obj:`~.cuMemAddressReserve`, :py:obj:`~.cuMemCreate`,\n' + ':py:obj:`~.cuMemMap` and related APIs\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR_SUPPORTED' in found_values}} - #: Device supports exporting memory to a posix file descriptor with - #: :py:obj:`~.cuMemExportToShareableHandle`, if requested via - #: :py:obj:`~.cuMemCreate` - CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR_SUPPORTED, + 'Device supports exporting memory to a posix file descriptor with\n' + ':py:obj:`~.cuMemExportToShareableHandle`, if requested via\n' + ':py:obj:`~.cuMemCreate`\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_HANDLE_SUPPORTED' in found_values}} - #: Device supports exporting memory to a Win32 NT handle with - #: :py:obj:`~.cuMemExportToShareableHandle`, if requested via - #: :py:obj:`~.cuMemCreate` - CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_HANDLE_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_HANDLE_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_HANDLE_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_HANDLE_SUPPORTED, + 'Device supports exporting memory to a Win32 NT handle with\n' + ':py:obj:`~.cuMemExportToShareableHandle`, if requested via\n' + ':py:obj:`~.cuMemCreate`\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED' in found_values}} - #: Device supports exporting memory to a Win32 KMT handle with - #: :py:obj:`~.cuMemExportToShareableHandle`, if requested via - #: :py:obj:`~.cuMemCreate` - CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED, + 'Device supports exporting memory to a Win32 KMT handle with\n' + ':py:obj:`~.cuMemExportToShareableHandle`, if requested via\n' + ':py:obj:`~.cuMemCreate`\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR' in found_values}} - #: Maximum number of blocks per multiprocessor - CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR{{endif}} + CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR, + 'Maximum number of blocks per multiprocessor\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_GENERIC_COMPRESSION_SUPPORTED' in found_values}} - #: Device supports compression of memory - CU_DEVICE_ATTRIBUTE_GENERIC_COMPRESSION_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GENERIC_COMPRESSION_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_GENERIC_COMPRESSION_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GENERIC_COMPRESSION_SUPPORTED, + 'Device supports compression of memory\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE' in found_values}} - #: Maximum L2 persisting lines capacity setting in bytes. - CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE{{endif}} + CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE, + 'Maximum L2 persisting lines capacity setting in bytes.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE' in found_values}} - #: Maximum value of :py:obj:`~.CUaccessPolicyWindow.num_bytes`. - CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE{{endif}} + CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE, + 'Maximum value of :py:obj:`~.CUaccessPolicyWindow.num_bytes`.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_CUDA_VMM_SUPPORTED' in found_values}} - #: Device supports specifying the GPUDirect RDMA flag with - #: :py:obj:`~.cuMemCreate` - CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_CUDA_VMM_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_CUDA_VMM_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_CUDA_VMM_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_CUDA_VMM_SUPPORTED, + 'Device supports specifying the GPUDirect RDMA flag with\n' + ':py:obj:`~.cuMemCreate`\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK' in found_values}} - #: Shared memory reserved by CUDA driver per block in bytes - CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK{{endif}} + CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK, + 'Shared memory reserved by CUDA driver per block in bytes\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_SPARSE_CUDA_ARRAY_SUPPORTED' in found_values}} - #: Device supports sparse CUDA arrays and sparse CUDA mipmapped arrays - CU_DEVICE_ATTRIBUTE_SPARSE_CUDA_ARRAY_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_SPARSE_CUDA_ARRAY_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_SPARSE_CUDA_ARRAY_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_SPARSE_CUDA_ARRAY_SUPPORTED, + 'Device supports sparse CUDA arrays and sparse CUDA mipmapped arrays\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED' in found_values}} - #: Device supports using the :py:obj:`~.cuMemHostRegister` flag - #: :py:obj:`~.CU_MEMHOSTERGISTER_READ_ONLY` to register memory that - #: must be mapped as read-only to the GPU - CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED, + 'Device supports using the :py:obj:`~.cuMemHostRegister` flag\n' + ':py:obj:`~.CU_MEMHOSTERGISTER_READ_ONLY` to register memory that must be\n' + 'mapped as read-only to the GPU\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_TIMELINE_SEMAPHORE_INTEROP_SUPPORTED' in found_values}} - #: External timeline semaphore interop is supported on the device - CU_DEVICE_ATTRIBUTE_TIMELINE_SEMAPHORE_INTEROP_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_TIMELINE_SEMAPHORE_INTEROP_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_TIMELINE_SEMAPHORE_INTEROP_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_TIMELINE_SEMAPHORE_INTEROP_SUPPORTED, + 'External timeline semaphore interop is supported on the device\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED' in found_values}} - #: Device supports using the :py:obj:`~.cuMemAllocAsync` and - #: :py:obj:`~.cuMemPool` family of APIs - CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED, + 'Device supports using the :py:obj:`~.cuMemAllocAsync` and\n' + ':py:obj:`~.cuMemPool` family of APIs\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_SUPPORTED' in found_values}} - #: Device supports GPUDirect RDMA APIs, like nvidia_p2p_get_pages (see - #: https://docs.nvidia.com/cuda/gpudirect-rdma for more information) - CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_SUPPORTED, + 'Device supports GPUDirect RDMA APIs, like nvidia_p2p_get_pages (see\n' + 'https://docs.nvidia.com/cuda/gpudirect-rdma for more information)\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS' in found_values}} - #: The returned attribute shall be interpreted as a bitmask, where the - #: individual bits are described by the - #: :py:obj:`~.CUflushGPUDirectRDMAWritesOptions` enum - CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS{{endif}} + CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS, + 'The returned attribute shall be interpreted as a bitmask, where the\n' + 'individual bits are described by the\n' + ':py:obj:`~.CUflushGPUDirectRDMAWritesOptions` enum\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING' in found_values}} - #: GPUDirect RDMA writes to the device do not need to be flushed for - #: consumers within the scope indicated by the returned attribute. See - #: :py:obj:`~.CUGPUDirectRDMAWritesOrdering` for the numerical values - #: returned here. - CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING{{endif}} + CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING, + 'GPUDirect RDMA writes to the device do not need to be flushed for consumers\n' + 'within the scope indicated by the returned attribute. See\n' + ':py:obj:`~.CUGPUDirectRDMAWritesOrdering` for the numerical values returned\n' + 'here.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPPORTED_HANDLE_TYPES' in found_values}} - #: Handle types supported with mempool based IPC - CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPPORTED_HANDLE_TYPES = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPPORTED_HANDLE_TYPES{{endif}} + CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPPORTED_HANDLE_TYPES = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPPORTED_HANDLE_TYPES, + 'Handle types supported with mempool based IPC\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_CLUSTER_LAUNCH' in found_values}} - #: Indicates device supports cluster launch - CU_DEVICE_ATTRIBUTE_CLUSTER_LAUNCH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CLUSTER_LAUNCH{{endif}} + CU_DEVICE_ATTRIBUTE_CLUSTER_LAUNCH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CLUSTER_LAUNCH, + 'Indicates device supports cluster launch\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_DEFERRED_MAPPING_CUDA_ARRAY_SUPPORTED' in found_values}} - #: Device supports deferred mapping CUDA arrays and CUDA mipmapped - #: arrays - CU_DEVICE_ATTRIBUTE_DEFERRED_MAPPING_CUDA_ARRAY_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_DEFERRED_MAPPING_CUDA_ARRAY_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_DEFERRED_MAPPING_CUDA_ARRAY_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_DEFERRED_MAPPING_CUDA_ARRAY_SUPPORTED, + 'Device supports deferred mapping CUDA arrays and CUDA mipmapped arrays\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS' in found_values}} - #: 64-bit operations are supported in :py:obj:`~.cuStreamBatchMemOp` - #: and related MemOp APIs. - CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS{{endif}} + CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS, + '64-bit operations are supported in :py:obj:`~.cuStreamBatchMemOp` and\n' + 'related MemOp APIs.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR' in found_values}} - #: :py:obj:`~.CU_STREAM_WAIT_VALUE_NOR` is supported by MemOp APIs. - CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR{{endif}} + CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR, + ':py:obj:`~.CU_STREAM_WAIT_VALUE_NOR` is supported by MemOp APIs.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTED' in found_values}} - #: Device supports buffer sharing with dma_buf mechanism. - CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTED, + 'Device supports buffer sharing with dma_buf mechanism.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED' in found_values}} - #: Device supports IPC Events. - CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED, + 'Device supports IPC Events.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MEM_SYNC_DOMAIN_COUNT' in found_values}} - #: Number of memory domains the device supports. - CU_DEVICE_ATTRIBUTE_MEM_SYNC_DOMAIN_COUNT = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MEM_SYNC_DOMAIN_COUNT{{endif}} + CU_DEVICE_ATTRIBUTE_MEM_SYNC_DOMAIN_COUNT = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MEM_SYNC_DOMAIN_COUNT, + 'Number of memory domains the device supports.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_TENSOR_MAP_ACCESS_SUPPORTED' in found_values}} - #: Device supports accessing memory using Tensor Map. - CU_DEVICE_ATTRIBUTE_TENSOR_MAP_ACCESS_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_TENSOR_MAP_ACCESS_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_TENSOR_MAP_ACCESS_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_TENSOR_MAP_ACCESS_SUPPORTED, + 'Device supports accessing memory using Tensor Map.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_FABRIC_SUPPORTED' in found_values}} - #: Device supports exporting memory to a fabric handle with - #: :py:obj:`~.cuMemExportToShareableHandle()` or requested with - #: :py:obj:`~.cuMemCreate()` - CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_FABRIC_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_FABRIC_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_FABRIC_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_FABRIC_SUPPORTED, + 'Device supports exporting memory to a fabric handle with\n' + ':py:obj:`~.cuMemExportToShareableHandle()` or requested with\n' + ':py:obj:`~.cuMemCreate()`\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_UNIFIED_FUNCTION_POINTERS' in found_values}} - #: Device supports unified function pointers. - CU_DEVICE_ATTRIBUTE_UNIFIED_FUNCTION_POINTERS = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_UNIFIED_FUNCTION_POINTERS{{endif}} + CU_DEVICE_ATTRIBUTE_UNIFIED_FUNCTION_POINTERS = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_UNIFIED_FUNCTION_POINTERS, + 'Device supports unified function pointers.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_NUMA_CONFIG' in found_values}} - #: NUMA configuration of a device: value is of type - #: :py:obj:`~.CUdeviceNumaConfig` enum - CU_DEVICE_ATTRIBUTE_NUMA_CONFIG = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_NUMA_CONFIG{{endif}} + CU_DEVICE_ATTRIBUTE_NUMA_CONFIG = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_NUMA_CONFIG, + 'NUMA configuration of a device: value is of type\n' + ':py:obj:`~.CUdeviceNumaConfig` enum\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_NUMA_ID' in found_values}} - #: NUMA node ID of the GPU memory - CU_DEVICE_ATTRIBUTE_NUMA_ID = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_NUMA_ID{{endif}} + CU_DEVICE_ATTRIBUTE_NUMA_ID = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_NUMA_ID, + 'NUMA node ID of the GPU memory\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED' in found_values}} - #: Device supports switch multicast and reduction operations. - CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED, + 'Device supports switch multicast and reduction operations.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MPS_ENABLED' in found_values}} - #: Indicates if contexts created on this device will be shared via MPS - CU_DEVICE_ATTRIBUTE_MPS_ENABLED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MPS_ENABLED{{endif}} + CU_DEVICE_ATTRIBUTE_MPS_ENABLED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MPS_ENABLED, + 'Indicates if contexts created on this device will be shared via MPS\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_HOST_NUMA_ID' in found_values}} - #: NUMA ID of the host node closest to the device. Returns -1 when - #: system does not support NUMA. - CU_DEVICE_ATTRIBUTE_HOST_NUMA_ID = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_NUMA_ID{{endif}} + CU_DEVICE_ATTRIBUTE_HOST_NUMA_ID = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_NUMA_ID, + 'NUMA ID of the host node closest to the device. Returns -1 when system does\n' + 'not support NUMA.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_D3D12_CIG_SUPPORTED' in found_values}} - #: Device supports CIG with D3D12. - CU_DEVICE_ATTRIBUTE_D3D12_CIG_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_D3D12_CIG_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_D3D12_CIG_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_D3D12_CIG_SUPPORTED, + 'Device supports CIG with D3D12.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_ALGORITHM_MASK' in found_values}} - #: The returned valued shall be interpreted as a bitmask, where the - #: individual bits are described by the - #: :py:obj:`~.CUmemDecompressAlgorithm` enum. - CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_ALGORITHM_MASK = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_ALGORITHM_MASK{{endif}} + CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_ALGORITHM_MASK = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_ALGORITHM_MASK, + 'The returned valued shall be interpreted as a bitmask, where the individual\n' + 'bits are described by the :py:obj:`~.CUmemDecompressAlgorithm` enum.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_MAXIMUM_LENGTH' in found_values}} - #: The returned valued is the maximum length in bytes of a single - #: decompress operation that is allowed. - CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_MAXIMUM_LENGTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_MAXIMUM_LENGTH{{endif}} + CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_MAXIMUM_LENGTH = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_MAXIMUM_LENGTH, + 'The returned valued is the maximum length in bytes of a single decompress\n' + 'operation that is allowed.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_VULKAN_CIG_SUPPORTED' in found_values}} - #: Device supports CIG with Vulkan. - CU_DEVICE_ATTRIBUTE_VULKAN_CIG_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_VULKAN_CIG_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_VULKAN_CIG_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_VULKAN_CIG_SUPPORTED, + 'Device supports CIG with Vulkan.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_GPU_PCI_DEVICE_ID' in found_values}} - #: The combined 16-bit PCI device ID and 16-bit PCI vendor ID. - CU_DEVICE_ATTRIBUTE_GPU_PCI_DEVICE_ID = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_PCI_DEVICE_ID{{endif}} + CU_DEVICE_ATTRIBUTE_GPU_PCI_DEVICE_ID = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_PCI_DEVICE_ID, + 'The combined 16-bit PCI device ID and 16-bit PCI vendor ID.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_GPU_PCI_SUBSYSTEM_ID' in found_values}} - #: The combined 16-bit PCI subsystem ID and 16-bit PCI subsystem vendor - #: ID. - CU_DEVICE_ATTRIBUTE_GPU_PCI_SUBSYSTEM_ID = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_PCI_SUBSYSTEM_ID{{endif}} + CU_DEVICE_ATTRIBUTE_GPU_PCI_SUBSYSTEM_ID = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_PCI_SUBSYSTEM_ID, + 'The combined 16-bit PCI subsystem ID and 16-bit PCI subsystem vendor ID.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_HOST_NUMA_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED' in found_values}} - #: Device supports HOST_NUMA location with the virtual memory - #: management APIs like :py:obj:`~.cuMemCreate`, :py:obj:`~.cuMemMap` - #: and related APIs - CU_DEVICE_ATTRIBUTE_HOST_NUMA_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_NUMA_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_HOST_NUMA_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_NUMA_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED, + 'Device supports HOST_NUMA location with the virtual memory management APIs\n' + 'like :py:obj:`~.cuMemCreate`, :py:obj:`~.cuMemMap` and related APIs\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_HOST_NUMA_MEMORY_POOLS_SUPPORTED' in found_values}} - #: Device supports HOST_NUMA location with the - #: :py:obj:`~.cuMemAllocAsync` and :py:obj:`~.cuMemPool` family of APIs - CU_DEVICE_ATTRIBUTE_HOST_NUMA_MEMORY_POOLS_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_NUMA_MEMORY_POOLS_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_HOST_NUMA_MEMORY_POOLS_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_NUMA_MEMORY_POOLS_SUPPORTED, + 'Device supports HOST_NUMA location with the :py:obj:`~.cuMemAllocAsync` and\n' + ':py:obj:`~.cuMemPool` family of APIs\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_HOST_NUMA_MULTINODE_IPC_SUPPORTED' in found_values}} - #: Device supports HOST_NUMA location IPC between nodes in a multi-node - #: system. - CU_DEVICE_ATTRIBUTE_HOST_NUMA_MULTINODE_IPC_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_NUMA_MULTINODE_IPC_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_HOST_NUMA_MULTINODE_IPC_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_NUMA_MULTINODE_IPC_SUPPORTED, + 'Device supports HOST_NUMA location IPC between nodes in a multi-node\n' + 'system.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_HOST_MEMORY_POOLS_SUPPORTED' in found_values}} - #: Device suports HOST location with the :py:obj:`~.cuMemAllocAsync` - #: and :py:obj:`~.cuMemPool` family of APIs - CU_DEVICE_ATTRIBUTE_HOST_MEMORY_POOLS_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_MEMORY_POOLS_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_HOST_MEMORY_POOLS_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_MEMORY_POOLS_SUPPORTED, + 'Device suports HOST location with the :py:obj:`~.cuMemAllocAsync` and\n' + ':py:obj:`~.cuMemPool` family of APIs\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_HOST_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED' in found_values}} - #: Device supports HOST location with the virtual memory management - #: APIs like :py:obj:`~.cuMemCreate`, :py:obj:`~.cuMemMap` and related - #: APIs - CU_DEVICE_ATTRIBUTE_HOST_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_HOST_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED, + 'Device supports HOST location with the virtual memory management APIs like\n' + ':py:obj:`~.cuMemCreate`, :py:obj:`~.cuMemMap` and related APIs\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_HOST_ALLOC_DMA_BUF_SUPPORTED' in found_values}} - #: Device supports page-locked host memory buffer sharing with dma_buf - #: mechanism. - CU_DEVICE_ATTRIBUTE_HOST_ALLOC_DMA_BUF_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_ALLOC_DMA_BUF_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_HOST_ALLOC_DMA_BUF_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_ALLOC_DMA_BUF_SUPPORTED, + 'Device supports page-locked host memory buffer sharing with dma_buf\n' + 'mechanism.\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_ONLY_PARTIAL_HOST_NATIVE_ATOMIC_SUPPORTED' in found_values}} - #: Link between the device and the host supports only some native - #: atomic operations - CU_DEVICE_ATTRIBUTE_ONLY_PARTIAL_HOST_NATIVE_ATOMIC_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_ONLY_PARTIAL_HOST_NATIVE_ATOMIC_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_ONLY_PARTIAL_HOST_NATIVE_ATOMIC_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_ONLY_PARTIAL_HOST_NATIVE_ATOMIC_SUPPORTED, + 'Link between the device and the host supports only some native atomic\n' + 'operations\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_ATOMIC_REDUCTION_SUPPORTED' in found_values}} - #: Device supports atomic reduction operations in stream batch memory - #: operations - CU_DEVICE_ATTRIBUTE_ATOMIC_REDUCTION_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_ATOMIC_REDUCTION_SUPPORTED{{endif}} + CU_DEVICE_ATTRIBUTE_ATOMIC_REDUCTION_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_ATOMIC_REDUCTION_SUPPORTED, + 'Device supports atomic reduction operations in stream batch memory\n' + 'operations\n' + ){{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAX' in found_values}} CU_DEVICE_ATTRIBUTE_MAX = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX{{endif}} -_dict_CUdevice_attribute = dict(((int(v), v) for k, v in CUdevice_attribute.__members__.items())) {{endif}} {{if 'CUpointer_attribute_enum' in found_types}} -class CUpointer_attribute(IntEnum): +class CUpointer_attribute(_FastEnum): """ Pointer information """ {{if 'CU_POINTER_ATTRIBUTE_CONTEXT' in found_values}} - #: The :py:obj:`~.CUcontext` on which a pointer was allocated or - #: registered - CU_POINTER_ATTRIBUTE_CONTEXT = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_CONTEXT{{endif}} + CU_POINTER_ATTRIBUTE_CONTEXT = ( + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_CONTEXT, + 'The :py:obj:`~.CUcontext` on which a pointer was allocated or registered\n' + ){{endif}} {{if 'CU_POINTER_ATTRIBUTE_MEMORY_TYPE' in found_values}} - #: The :py:obj:`~.CUmemorytype` describing the physical location of a - #: pointer - CU_POINTER_ATTRIBUTE_MEMORY_TYPE = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_TYPE{{endif}} + CU_POINTER_ATTRIBUTE_MEMORY_TYPE = ( + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_TYPE, + 'The :py:obj:`~.CUmemorytype` describing the physical location of a pointer\n' + ){{endif}} {{if 'CU_POINTER_ATTRIBUTE_DEVICE_POINTER' in found_values}} - #: The address at which a pointer's memory may be accessed on the - #: device - CU_POINTER_ATTRIBUTE_DEVICE_POINTER = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_POINTER{{endif}} + CU_POINTER_ATTRIBUTE_DEVICE_POINTER = ( + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_POINTER, + "The address at which a pointer's memory may be accessed on the device\n" + ){{endif}} {{if 'CU_POINTER_ATTRIBUTE_HOST_POINTER' in found_values}} - #: The address at which a pointer's memory may be accessed on the host - CU_POINTER_ATTRIBUTE_HOST_POINTER = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_HOST_POINTER{{endif}} + CU_POINTER_ATTRIBUTE_HOST_POINTER = ( + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_HOST_POINTER, + "The address at which a pointer's memory may be accessed on the host\n" + ){{endif}} {{if 'CU_POINTER_ATTRIBUTE_P2P_TOKENS' in found_values}} - #: A pair of tokens for use with the nv-p2p.h Linux kernel interface - CU_POINTER_ATTRIBUTE_P2P_TOKENS = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_P2P_TOKENS{{endif}} + CU_POINTER_ATTRIBUTE_P2P_TOKENS = ( + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_P2P_TOKENS, + 'A pair of tokens for use with the nv-p2p.h Linux kernel interface\n' + ){{endif}} {{if 'CU_POINTER_ATTRIBUTE_SYNC_MEMOPS' in found_values}} - #: Synchronize every synchronous memory operation initiated on this - #: region - CU_POINTER_ATTRIBUTE_SYNC_MEMOPS = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS{{endif}} + CU_POINTER_ATTRIBUTE_SYNC_MEMOPS = ( + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_SYNC_MEMOPS, + 'Synchronize every synchronous memory operation initiated on this region\n' + ){{endif}} {{if 'CU_POINTER_ATTRIBUTE_BUFFER_ID' in found_values}} - #: A process-wide unique ID for an allocated memory region - CU_POINTER_ATTRIBUTE_BUFFER_ID = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_BUFFER_ID{{endif}} + CU_POINTER_ATTRIBUTE_BUFFER_ID = ( + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_BUFFER_ID, + 'A process-wide unique ID for an allocated memory region\n' + ){{endif}} {{if 'CU_POINTER_ATTRIBUTE_IS_MANAGED' in found_values}} - #: Indicates if the pointer points to managed memory - CU_POINTER_ATTRIBUTE_IS_MANAGED = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_MANAGED{{endif}} + CU_POINTER_ATTRIBUTE_IS_MANAGED = ( + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_MANAGED, + 'Indicates if the pointer points to managed memory\n' + ){{endif}} {{if 'CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL' in found_values}} - #: A device ordinal of a device on which a pointer was allocated or - #: registered - CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL{{endif}} + CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL = ( + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL, + 'A device ordinal of a device on which a pointer was allocated or registered\n' + ){{endif}} {{if 'CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE' in found_values}} - #: 1 if this pointer maps to an allocation that is suitable for - #: :py:obj:`~.cudaIpcGetMemHandle`, 0 otherwise - CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE{{endif}} + CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE = ( + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE, + '1 if this pointer maps to an allocation that is suitable for\n' + ':py:obj:`~.cudaIpcGetMemHandle`, 0 otherwise\n' + ){{endif}} {{if 'CU_POINTER_ATTRIBUTE_RANGE_START_ADDR' in found_values}} - #: Starting address for this requested pointer - CU_POINTER_ATTRIBUTE_RANGE_START_ADDR = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_START_ADDR{{endif}} + CU_POINTER_ATTRIBUTE_RANGE_START_ADDR = ( + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_START_ADDR, + 'Starting address for this requested pointer\n' + ){{endif}} {{if 'CU_POINTER_ATTRIBUTE_RANGE_SIZE' in found_values}} - #: Size of the address range for this requested pointer - CU_POINTER_ATTRIBUTE_RANGE_SIZE = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_SIZE{{endif}} + CU_POINTER_ATTRIBUTE_RANGE_SIZE = ( + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_RANGE_SIZE, + 'Size of the address range for this requested pointer\n' + ){{endif}} {{if 'CU_POINTER_ATTRIBUTE_MAPPED' in found_values}} - #: 1 if this pointer is in a valid address range that is mapped to a - #: backing allocation, 0 otherwise - CU_POINTER_ATTRIBUTE_MAPPED = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPED{{endif}} + CU_POINTER_ATTRIBUTE_MAPPED = ( + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPED, + '1 if this pointer is in a valid address range that is mapped to a backing\n' + 'allocation, 0 otherwise\n' + ){{endif}} {{if 'CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES' in found_values}} - #: Bitmask of allowed :py:obj:`~.CUmemAllocationHandleType` for this - #: allocation - CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES{{endif}} + CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES = ( + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES, + 'Bitmask of allowed :py:obj:`~.CUmemAllocationHandleType` for this\n' + 'allocation\n' + ){{endif}} {{if 'CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE' in found_values}} - #: 1 if the memory this pointer is referencing can be used with the - #: GPUDirect RDMA API - CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE{{endif}} + CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE = ( + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE, + '1 if the memory this pointer is referencing can be used with the GPUDirect\n' + 'RDMA API\n' + ){{endif}} {{if 'CU_POINTER_ATTRIBUTE_ACCESS_FLAGS' in found_values}} - #: Returns the access flags the device associated with the current - #: context has on the corresponding memory referenced by the pointer - #: given - CU_POINTER_ATTRIBUTE_ACCESS_FLAGS = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAGS{{endif}} + CU_POINTER_ATTRIBUTE_ACCESS_FLAGS = ( + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAGS, + 'Returns the access flags the device associated with the current context has\n' + 'on the corresponding memory referenced by the pointer given\n' + ){{endif}} {{if 'CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE' in found_values}} - #: Returns the mempool handle for the allocation if it was allocated - #: from a mempool. Otherwise returns NULL. - CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE{{endif}} + CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE = ( + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE, + 'Returns the mempool handle for the allocation if it was allocated from a\n' + 'mempool. Otherwise returns NULL.\n' + ){{endif}} {{if 'CU_POINTER_ATTRIBUTE_MAPPING_SIZE' in found_values}} - #: Size of the actual underlying mapping that the pointer belongs to - CU_POINTER_ATTRIBUTE_MAPPING_SIZE = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPING_SIZE{{endif}} + CU_POINTER_ATTRIBUTE_MAPPING_SIZE = ( + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPING_SIZE, + 'Size of the actual underlying mapping that the pointer belongs to\n' + ){{endif}} {{if 'CU_POINTER_ATTRIBUTE_MAPPING_BASE_ADDR' in found_values}} - #: The start address of the mapping that the pointer belongs to - CU_POINTER_ATTRIBUTE_MAPPING_BASE_ADDR = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPING_BASE_ADDR{{endif}} + CU_POINTER_ATTRIBUTE_MAPPING_BASE_ADDR = ( + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MAPPING_BASE_ADDR, + 'The start address of the mapping that the pointer belongs to\n' + ){{endif}} {{if 'CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID' in found_values}} - #: A process-wide unique id corresponding to the physical allocation - #: the pointer belongs to - CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID{{endif}} + CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID = ( + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID, + 'A process-wide unique id corresponding to the physical allocation the\n' + 'pointer belongs to\n' + ){{endif}} {{if 'CU_POINTER_ATTRIBUTE_IS_HW_DECOMPRESS_CAPABLE' in found_values}} - #: Returns in `*data` a boolean that indicates whether the pointer - #: points to memory that is capable to be used for hardware accelerated - #: decompression. - CU_POINTER_ATTRIBUTE_IS_HW_DECOMPRESS_CAPABLE = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_HW_DECOMPRESS_CAPABLE{{endif}} + CU_POINTER_ATTRIBUTE_IS_HW_DECOMPRESS_CAPABLE = ( + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_HW_DECOMPRESS_CAPABLE, + 'Returns in `*data` a boolean that indicates whether the pointer points to\n' + 'memory that is capable to be used for hardware accelerated decompression.\n' + ){{endif}} -_dict_CUpointer_attribute = dict(((int(v), v) for k, v in CUpointer_attribute.__members__.items())) {{endif}} {{if 'CUfunction_attribute_enum' in found_types}} -class CUfunction_attribute(IntEnum): +class CUfunction_attribute(_FastEnum): """ Function properties """ {{if 'CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK' in found_values}} - #: The maximum number of threads per block, beyond which a launch of - #: the function would fail. This number depends on both the function - #: and the device on which the function is currently loaded. - CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK{{endif}} + CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK = ( + cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK, + 'The maximum number of threads per block, beyond which a launch of the\n' + 'function would fail. This number depends on both the function and the\n' + 'device on which the function is currently loaded.\n' + ){{endif}} {{if 'CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES' in found_values}} - #: The size in bytes of statically-allocated shared memory required by - #: this function. This does not include dynamically-allocated shared - #: memory requested by the user at runtime. - CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES{{endif}} + CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES = ( + cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES, + 'The size in bytes of statically-allocated shared memory required by this\n' + 'function. This does not include dynamically-allocated shared memory\n' + 'requested by the user at runtime.\n' + ){{endif}} {{if 'CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES' in found_values}} - #: The size in bytes of user-allocated constant memory required by this - #: function. - CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES{{endif}} + CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES = ( + cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES, + 'The size in bytes of user-allocated constant memory required by this\n' + 'function.\n' + ){{endif}} {{if 'CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES' in found_values}} - #: The size in bytes of local memory used by each thread of this - #: function. - CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES{{endif}} + CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES = ( + cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES, + 'The size in bytes of local memory used by each thread of this function.\n' + ){{endif}} {{if 'CU_FUNC_ATTRIBUTE_NUM_REGS' in found_values}} - #: The number of registers used by each thread of this function. - CU_FUNC_ATTRIBUTE_NUM_REGS = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_NUM_REGS{{endif}} + CU_FUNC_ATTRIBUTE_NUM_REGS = ( + cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_NUM_REGS, + 'The number of registers used by each thread of this function.\n' + ){{endif}} {{if 'CU_FUNC_ATTRIBUTE_PTX_VERSION' in found_values}} - #: The PTX virtual architecture version for which the function was - #: compiled. This value is the major PTX version * 10 + the minor PTX - #: version, so a PTX version 1.3 function would return the value 13. - #: Note that this may return the undefined value of 0 for cubins - #: compiled prior to CUDA 3.0. - CU_FUNC_ATTRIBUTE_PTX_VERSION = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_PTX_VERSION{{endif}} + CU_FUNC_ATTRIBUTE_PTX_VERSION = ( + cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_PTX_VERSION, + 'The PTX virtual architecture version for which the function was compiled.\n' + 'This value is the major PTX version * 10 + the minor PTX version, so a PTX\n' + 'version 1.3 function would return the value 13. Note that this may return\n' + 'the undefined value of 0 for cubins compiled prior to CUDA 3.0.\n' + ){{endif}} {{if 'CU_FUNC_ATTRIBUTE_BINARY_VERSION' in found_values}} - #: The binary architecture version for which the function was compiled. - #: This value is the major binary version * 10 + the minor binary - #: version, so a binary version 1.3 function would return the value 13. - #: Note that this will return a value of 10 for legacy cubins that do - #: not have a properly-encoded binary architecture version. - CU_FUNC_ATTRIBUTE_BINARY_VERSION = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_BINARY_VERSION{{endif}} + CU_FUNC_ATTRIBUTE_BINARY_VERSION = ( + cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_BINARY_VERSION, + 'The binary architecture version for which the function was compiled. This\n' + 'value is the major binary version * 10 + the minor binary version, so a\n' + 'binary version 1.3 function would return the value 13. Note that this will\n' + 'return a value of 10 for legacy cubins that do not have a properly-encoded\n' + 'binary architecture version.\n' + ){{endif}} {{if 'CU_FUNC_ATTRIBUTE_CACHE_MODE_CA' in found_values}} - #: The attribute to indicate whether the function has been compiled - #: with user specified option "-Xptxas --dlcm=ca" set . - CU_FUNC_ATTRIBUTE_CACHE_MODE_CA = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_CACHE_MODE_CA{{endif}} + CU_FUNC_ATTRIBUTE_CACHE_MODE_CA = ( + cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_CACHE_MODE_CA, + 'The attribute to indicate whether the function has been compiled with user\n' + 'specified option "-Xptxas --dlcm=ca" set .\n' + ){{endif}} {{if 'CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES' in found_values}} - #: The maximum size in bytes of dynamically-allocated shared memory - #: that can be used by this function. If the user-specified dynamic - #: shared memory size is larger than this value, the launch will fail. - #: The default value of this attribute is - #: :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK` - - #: :py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES`, except when - #: :py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES` is greater than - #: :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK`, then - #: the default value of this attribute is 0. The value can be increased - #: to :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN` - #: - :py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES`. See - #: :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` - CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES{{endif}} + CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES = ( + cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES, + 'The maximum size in bytes of dynamically-allocated shared memory that can\n' + 'be used by this function. If the user-specified dynamic shared memory size\n' + 'is larger than this value, the launch will fail. The default value of this\n' + 'attribute is :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK` -\n' + ':py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES`, except when\n' + ':py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES` is greater than\n' + ':py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK`, then the\n' + 'default value of this attribute is 0. The value can be increased to\n' + ':py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN` -\n' + ':py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES`. See\n' + ':py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute`\n' + ){{endif}} {{if 'CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT' in found_values}} - #: On devices where the L1 cache and shared memory use the same - #: hardware resources, this sets the shared memory carveout preference, - #: in percent of the total shared memory. Refer to - #: :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR`. - #: This is only a hint, and the driver can choose a different ratio if - #: required to execute the function. See - #: :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` - CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT{{endif}} + CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = ( + cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT, + 'On devices where the L1 cache and shared memory use the same hardware\n' + 'resources, this sets the shared memory carveout preference, in percent of\n' + 'the total shared memory. Refer to\n' + ':py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR`. This\n' + 'is only a hint, and the driver can choose a different ratio if required to\n' + 'execute the function. See :py:obj:`~.cuFuncSetAttribute`,\n' + ':py:obj:`~.cuKernelSetAttribute`\n' + ){{endif}} {{if 'CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET' in found_values}} - #: If this attribute is set, the kernel must launch with a valid - #: cluster size specified. See :py:obj:`~.cuFuncSetAttribute`, - #: :py:obj:`~.cuKernelSetAttribute` - CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET{{endif}} + CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET = ( + cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET, + 'If this attribute is set, the kernel must launch with a valid cluster size\n' + 'specified. See :py:obj:`~.cuFuncSetAttribute`,\n' + ':py:obj:`~.cuKernelSetAttribute`\n' + ){{endif}} {{if 'CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH' in found_values}} - #: The required cluster width in blocks. The values must either all be - #: 0 or all be positive. The validity of the cluster dimensions is - #: otherwise checked at launch time. - #: - #: If the value is set during compile time, it cannot be set at - #: runtime. Setting it at runtime will return CUDA_ERROR_NOT_PERMITTED. - #: See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` - CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH{{endif}} + CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH = ( + cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH, + 'The required cluster width in blocks. The values must either all be 0 or\n' + 'all be positive. The validity of the cluster dimensions is otherwise\n' + 'checked at launch time.\n' + 'If the value is set during compile time, it cannot be set at runtime.\n' + 'Setting it at runtime will return CUDA_ERROR_NOT_PERMITTED. See\n' + ':py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute`\n' + ){{endif}} {{if 'CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT' in found_values}} - #: The required cluster height in blocks. The values must either all be - #: 0 or all be positive. The validity of the cluster dimensions is - #: otherwise checked at launch time. - #: - #: If the value is set during compile time, it cannot be set at - #: runtime. Setting it at runtime should return - #: CUDA_ERROR_NOT_PERMITTED. See :py:obj:`~.cuFuncSetAttribute`, - #: :py:obj:`~.cuKernelSetAttribute` - CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT{{endif}} + CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT = ( + cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT, + 'The required cluster height in blocks. The values must either all be 0 or\n' + 'all be positive. The validity of the cluster dimensions is otherwise\n' + 'checked at launch time.\n' + 'If the value is set during compile time, it cannot be set at runtime.\n' + 'Setting it at runtime should return CUDA_ERROR_NOT_PERMITTED. See\n' + ':py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute`\n' + ){{endif}} {{if 'CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH' in found_values}} - #: The required cluster depth in blocks. The values must either all be - #: 0 or all be positive. The validity of the cluster dimensions is - #: otherwise checked at launch time. - #: - #: If the value is set during compile time, it cannot be set at - #: runtime. Setting it at runtime should return - #: CUDA_ERROR_NOT_PERMITTED. See :py:obj:`~.cuFuncSetAttribute`, - #: :py:obj:`~.cuKernelSetAttribute` - CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH{{endif}} + CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH = ( + cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH, + 'The required cluster depth in blocks. The values must either all be 0 or\n' + 'all be positive. The validity of the cluster dimensions is otherwise\n' + 'checked at launch time.\n' + 'If the value is set during compile time, it cannot be set at runtime.\n' + 'Setting it at runtime should return CUDA_ERROR_NOT_PERMITTED. See\n' + ':py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute`\n' + ){{endif}} {{if 'CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED' in found_values}} - #: Whether the function can be launched with non-portable cluster size. - #: 1 is allowed, 0 is disallowed. A non-portable cluster size may only - #: function on the specific SKUs the program is tested on. The launch - #: might fail if the program is run on a different hardware platform. - #: - #: CUDA API provides cudaOccupancyMaxActiveClusters to assist with - #: checking whether the desired size can be launched on the current - #: device. - #: - #: Portable Cluster Size - #: - #: A portable cluster size is guaranteed to be functional on all - #: compute capabilities higher than the target compute capability. The - #: portable cluster size for sm_90 is 8 blocks per cluster. This value - #: may increase for future compute capabilities. - #: - #: The specific hardware unit may support higher cluster sizes that’s - #: not guaranteed to be portable. See :py:obj:`~.cuFuncSetAttribute`, - #: :py:obj:`~.cuKernelSetAttribute` - CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED{{endif}} + CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED = ( + cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED, + 'Whether the function can be launched with non-portable cluster size. 1 is\n' + 'allowed, 0 is disallowed. A non-portable cluster size may only function on\n' + 'the specific SKUs the program is tested on. The launch might fail if the\n' + 'program is run on a different hardware platform.\n' + 'CUDA API provides cudaOccupancyMaxActiveClusters to assist with checking\n' + 'whether the desired size can be launched on the current device.\n' + 'Portable Cluster Size\n' + 'A portable cluster size is guaranteed to be functional on all compute\n' + 'capabilities higher than the target compute capability. The portable\n' + 'cluster size for sm_90 is 8 blocks per cluster. This value may increase for\n' + 'future compute capabilities.\n' + 'The specific hardware unit may support higher cluster sizes that’s not\n' + 'guaranteed to be portable. See :py:obj:`~.cuFuncSetAttribute`,\n' + ':py:obj:`~.cuKernelSetAttribute`\n' + ){{endif}} {{if 'CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE' in found_values}} - #: The block scheduling policy of a function. The value type is - #: CUclusterSchedulingPolicy / cudaClusterSchedulingPolicy. See - #: :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` - CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE{{endif}} + CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = ( + cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE, + 'The block scheduling policy of a function. The value type is\n' + 'CUclusterSchedulingPolicy / cudaClusterSchedulingPolicy. See\n' + ':py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute`\n' + ){{endif}} {{if 'CU_FUNC_ATTRIBUTE_MAX' in found_values}} CU_FUNC_ATTRIBUTE_MAX = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_MAX{{endif}} -_dict_CUfunction_attribute = dict(((int(v), v) for k, v in CUfunction_attribute.__members__.items())) {{endif}} {{if 'CUfunc_cache_enum' in found_types}} -class CUfunc_cache(IntEnum): +class CUfunc_cache(_FastEnum): """ Function cache configurations """ {{if 'CU_FUNC_CACHE_PREFER_NONE' in found_values}} - #: no preference for shared memory or L1 (default) - CU_FUNC_CACHE_PREFER_NONE = cydriver.CUfunc_cache_enum.CU_FUNC_CACHE_PREFER_NONE{{endif}} + CU_FUNC_CACHE_PREFER_NONE = ( + cydriver.CUfunc_cache_enum.CU_FUNC_CACHE_PREFER_NONE, + 'no preference for shared memory or L1 (default)\n' + ){{endif}} {{if 'CU_FUNC_CACHE_PREFER_SHARED' in found_values}} - #: prefer larger shared memory and smaller L1 cache - CU_FUNC_CACHE_PREFER_SHARED = cydriver.CUfunc_cache_enum.CU_FUNC_CACHE_PREFER_SHARED{{endif}} + CU_FUNC_CACHE_PREFER_SHARED = ( + cydriver.CUfunc_cache_enum.CU_FUNC_CACHE_PREFER_SHARED, + 'prefer larger shared memory and smaller L1 cache\n' + ){{endif}} {{if 'CU_FUNC_CACHE_PREFER_L1' in found_values}} - #: prefer larger L1 cache and smaller shared memory - CU_FUNC_CACHE_PREFER_L1 = cydriver.CUfunc_cache_enum.CU_FUNC_CACHE_PREFER_L1{{endif}} + CU_FUNC_CACHE_PREFER_L1 = ( + cydriver.CUfunc_cache_enum.CU_FUNC_CACHE_PREFER_L1, + 'prefer larger L1 cache and smaller shared memory\n' + ){{endif}} {{if 'CU_FUNC_CACHE_PREFER_EQUAL' in found_values}} - #: prefer equal sized L1 cache and shared memory - CU_FUNC_CACHE_PREFER_EQUAL = cydriver.CUfunc_cache_enum.CU_FUNC_CACHE_PREFER_EQUAL{{endif}} + CU_FUNC_CACHE_PREFER_EQUAL = ( + cydriver.CUfunc_cache_enum.CU_FUNC_CACHE_PREFER_EQUAL, + 'prefer equal sized L1 cache and shared memory\n' + ){{endif}} -_dict_CUfunc_cache = dict(((int(v), v) for k, v in CUfunc_cache.__members__.items())) {{endif}} {{if 'CUsharedconfig_enum' in found_types}} -class CUsharedconfig(IntEnum): +class CUsharedconfig(_FastEnum): """ [Deprecated] Shared memory configurations """ {{if 'CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE' in found_values}} - #: set default shared memory bank size - CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE = cydriver.CUsharedconfig_enum.CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE{{endif}} + CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE = ( + cydriver.CUsharedconfig_enum.CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE, + 'set default shared memory bank size\n' + ){{endif}} {{if 'CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE' in found_values}} - #: set shared memory bank width to four bytes - CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE = cydriver.CUsharedconfig_enum.CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE{{endif}} + CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE = ( + cydriver.CUsharedconfig_enum.CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE, + 'set shared memory bank width to four bytes\n' + ){{endif}} {{if 'CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE' in found_values}} - #: set shared memory bank width to eight bytes - CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE = cydriver.CUsharedconfig_enum.CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE{{endif}} + CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE = ( + cydriver.CUsharedconfig_enum.CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE, + 'set shared memory bank width to eight bytes\n' + ){{endif}} -_dict_CUsharedconfig = dict(((int(v), v) for k, v in CUsharedconfig.__members__.items())) {{endif}} {{if 'CUshared_carveout_enum' in found_types}} -class CUshared_carveout(IntEnum): +class CUshared_carveout(_FastEnum): """ Shared memory carveout configurations. These may be passed to :py:obj:`~.cuFuncSetAttribute` or :py:obj:`~.cuKernelSetAttribute` """ {{if 'CU_SHAREDMEM_CARVEOUT_DEFAULT' in found_values}} - #: No preference for shared memory or L1 (default) - CU_SHAREDMEM_CARVEOUT_DEFAULT = cydriver.CUshared_carveout_enum.CU_SHAREDMEM_CARVEOUT_DEFAULT{{endif}} + CU_SHAREDMEM_CARVEOUT_DEFAULT = ( + cydriver.CUshared_carveout_enum.CU_SHAREDMEM_CARVEOUT_DEFAULT, + 'No preference for shared memory or L1 (default)\n' + ){{endif}} {{if 'CU_SHAREDMEM_CARVEOUT_MAX_L1' in found_values}} - #: Prefer maximum available L1 cache, minimum shared memory - CU_SHAREDMEM_CARVEOUT_MAX_L1 = cydriver.CUshared_carveout_enum.CU_SHAREDMEM_CARVEOUT_MAX_L1{{endif}} + CU_SHAREDMEM_CARVEOUT_MAX_L1 = ( + cydriver.CUshared_carveout_enum.CU_SHAREDMEM_CARVEOUT_MAX_L1, + 'Prefer maximum available L1 cache, minimum shared memory\n' + ){{endif}} {{if 'CU_SHAREDMEM_CARVEOUT_MAX_SHARED' in found_values}} - #: Prefer maximum available shared memory, minimum L1 cache - CU_SHAREDMEM_CARVEOUT_MAX_SHARED = cydriver.CUshared_carveout_enum.CU_SHAREDMEM_CARVEOUT_MAX_SHARED{{endif}} + CU_SHAREDMEM_CARVEOUT_MAX_SHARED = ( + cydriver.CUshared_carveout_enum.CU_SHAREDMEM_CARVEOUT_MAX_SHARED, + 'Prefer maximum available shared memory, minimum L1 cache\n' + ){{endif}} -_dict_CUshared_carveout = dict(((int(v), v) for k, v in CUshared_carveout.__members__.items())) {{endif}} {{if 'CUmemorytype_enum' in found_types}} -class CUmemorytype(IntEnum): +class CUmemorytype(_FastEnum): """ Memory types """ {{if 'CU_MEMORYTYPE_HOST' in found_values}} - #: Host memory - CU_MEMORYTYPE_HOST = cydriver.CUmemorytype_enum.CU_MEMORYTYPE_HOST{{endif}} + CU_MEMORYTYPE_HOST = ( + cydriver.CUmemorytype_enum.CU_MEMORYTYPE_HOST, + 'Host memory\n' + ){{endif}} {{if 'CU_MEMORYTYPE_DEVICE' in found_values}} - #: Device memory - CU_MEMORYTYPE_DEVICE = cydriver.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE{{endif}} + CU_MEMORYTYPE_DEVICE = ( + cydriver.CUmemorytype_enum.CU_MEMORYTYPE_DEVICE, + 'Device memory\n' + ){{endif}} {{if 'CU_MEMORYTYPE_ARRAY' in found_values}} - #: Array memory - CU_MEMORYTYPE_ARRAY = cydriver.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY{{endif}} + CU_MEMORYTYPE_ARRAY = ( + cydriver.CUmemorytype_enum.CU_MEMORYTYPE_ARRAY, + 'Array memory\n' + ){{endif}} {{if 'CU_MEMORYTYPE_UNIFIED' in found_values}} - #: Unified device or host memory - CU_MEMORYTYPE_UNIFIED = cydriver.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED{{endif}} + CU_MEMORYTYPE_UNIFIED = ( + cydriver.CUmemorytype_enum.CU_MEMORYTYPE_UNIFIED, + 'Unified device or host memory\n' + ){{endif}} -_dict_CUmemorytype = dict(((int(v), v) for k, v in CUmemorytype.__members__.items())) {{endif}} {{if 'CUcomputemode_enum' in found_types}} -class CUcomputemode(IntEnum): +class CUcomputemode(_FastEnum): """ Compute Modes """ {{if 'CU_COMPUTEMODE_DEFAULT' in found_values}} - #: Default compute mode (Multiple contexts allowed per device) - CU_COMPUTEMODE_DEFAULT = cydriver.CUcomputemode_enum.CU_COMPUTEMODE_DEFAULT{{endif}} + CU_COMPUTEMODE_DEFAULT = ( + cydriver.CUcomputemode_enum.CU_COMPUTEMODE_DEFAULT, + 'Default compute mode (Multiple contexts allowed per device)\n' + ){{endif}} {{if 'CU_COMPUTEMODE_PROHIBITED' in found_values}} - #: Compute-prohibited mode (No contexts can be created on this device - #: at this time) - CU_COMPUTEMODE_PROHIBITED = cydriver.CUcomputemode_enum.CU_COMPUTEMODE_PROHIBITED{{endif}} + CU_COMPUTEMODE_PROHIBITED = ( + cydriver.CUcomputemode_enum.CU_COMPUTEMODE_PROHIBITED, + 'Compute-prohibited mode (No contexts can be created on this device at this\n' + 'time)\n' + ){{endif}} {{if 'CU_COMPUTEMODE_EXCLUSIVE_PROCESS' in found_values}} - #: Compute-exclusive-process mode (Only one context used by a single - #: process can be present on this device at a time) - CU_COMPUTEMODE_EXCLUSIVE_PROCESS = cydriver.CUcomputemode_enum.CU_COMPUTEMODE_EXCLUSIVE_PROCESS{{endif}} + CU_COMPUTEMODE_EXCLUSIVE_PROCESS = ( + cydriver.CUcomputemode_enum.CU_COMPUTEMODE_EXCLUSIVE_PROCESS, + 'Compute-exclusive-process mode (Only one context used by a single process\n' + 'can be present on this device at a time)\n' + ){{endif}} -_dict_CUcomputemode = dict(((int(v), v) for k, v in CUcomputemode.__members__.items())) {{endif}} {{if 'CUmem_advise_enum' in found_types}} -class CUmem_advise(IntEnum): +class CUmem_advise(_FastEnum): """ Memory advise values """ {{if 'CU_MEM_ADVISE_SET_READ_MOSTLY' in found_values}} - #: Data will mostly be read and only occasionally be written to - CU_MEM_ADVISE_SET_READ_MOSTLY = cydriver.CUmem_advise_enum.CU_MEM_ADVISE_SET_READ_MOSTLY{{endif}} + CU_MEM_ADVISE_SET_READ_MOSTLY = ( + cydriver.CUmem_advise_enum.CU_MEM_ADVISE_SET_READ_MOSTLY, + 'Data will mostly be read and only occasionally be written to\n' + ){{endif}} {{if 'CU_MEM_ADVISE_UNSET_READ_MOSTLY' in found_values}} - #: Undo the effect of :py:obj:`~.CU_MEM_ADVISE_SET_READ_MOSTLY` - CU_MEM_ADVISE_UNSET_READ_MOSTLY = cydriver.CUmem_advise_enum.CU_MEM_ADVISE_UNSET_READ_MOSTLY{{endif}} + CU_MEM_ADVISE_UNSET_READ_MOSTLY = ( + cydriver.CUmem_advise_enum.CU_MEM_ADVISE_UNSET_READ_MOSTLY, + 'Undo the effect of :py:obj:`~.CU_MEM_ADVISE_SET_READ_MOSTLY`\n' + ){{endif}} {{if 'CU_MEM_ADVISE_SET_PREFERRED_LOCATION' in found_values}} - #: Set the preferred location for the data as the specified device - CU_MEM_ADVISE_SET_PREFERRED_LOCATION = cydriver.CUmem_advise_enum.CU_MEM_ADVISE_SET_PREFERRED_LOCATION{{endif}} + CU_MEM_ADVISE_SET_PREFERRED_LOCATION = ( + cydriver.CUmem_advise_enum.CU_MEM_ADVISE_SET_PREFERRED_LOCATION, + 'Set the preferred location for the data as the specified device\n' + ){{endif}} {{if 'CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION' in found_values}} - #: Clear the preferred location for the data - CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION = cydriver.CUmem_advise_enum.CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION{{endif}} + CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION = ( + cydriver.CUmem_advise_enum.CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION, + 'Clear the preferred location for the data\n' + ){{endif}} {{if 'CU_MEM_ADVISE_SET_ACCESSED_BY' in found_values}} - #: Data will be accessed by the specified device, so prevent page - #: faults as much as possible - CU_MEM_ADVISE_SET_ACCESSED_BY = cydriver.CUmem_advise_enum.CU_MEM_ADVISE_SET_ACCESSED_BY{{endif}} + CU_MEM_ADVISE_SET_ACCESSED_BY = ( + cydriver.CUmem_advise_enum.CU_MEM_ADVISE_SET_ACCESSED_BY, + 'Data will be accessed by the specified device, so prevent page faults as\n' + 'much as possible\n' + ){{endif}} {{if 'CU_MEM_ADVISE_UNSET_ACCESSED_BY' in found_values}} - #: Let the Unified Memory subsystem decide on the page faulting policy - #: for the specified device - CU_MEM_ADVISE_UNSET_ACCESSED_BY = cydriver.CUmem_advise_enum.CU_MEM_ADVISE_UNSET_ACCESSED_BY{{endif}} + CU_MEM_ADVISE_UNSET_ACCESSED_BY = ( + cydriver.CUmem_advise_enum.CU_MEM_ADVISE_UNSET_ACCESSED_BY, + 'Let the Unified Memory subsystem decide on the page faulting policy for the\n' + 'specified device\n' + ){{endif}} -_dict_CUmem_advise = dict(((int(v), v) for k, v in CUmem_advise.__members__.items())) {{endif}} {{if 'CUmem_range_attribute_enum' in found_types}} -class CUmem_range_attribute(IntEnum): +class CUmem_range_attribute(_FastEnum): """ """ {{if 'CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY' in found_values}} - #: Whether the range will mostly be read and only occasionally be - #: written to - CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY = cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY{{endif}} + CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY = ( + cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY, + 'Whether the range will mostly be read and only occasionally be written to\n' + ){{endif}} {{if 'CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION' in found_values}} - #: The preferred location of the range - CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION = cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION{{endif}} + CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION = ( + cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION, + 'The preferred location of the range\n' + ){{endif}} {{if 'CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY' in found_values}} - #: Memory range has :py:obj:`~.CU_MEM_ADVISE_SET_ACCESSED_BY` set for - #: specified device - CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY = cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY{{endif}} + CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY = ( + cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY, + 'Memory range has :py:obj:`~.CU_MEM_ADVISE_SET_ACCESSED_BY` set for\n' + 'specified device\n' + ){{endif}} {{if 'CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION' in found_values}} - #: The last location to which the range was prefetched - CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION = cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION{{endif}} + CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION = ( + cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION, + 'The last location to which the range was prefetched\n' + ){{endif}} {{if 'CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_TYPE' in found_values}} - #: The preferred location type of the range - CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_TYPE = cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_TYPE{{endif}} + CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_TYPE = ( + cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_TYPE, + 'The preferred location type of the range\n' + ){{endif}} {{if 'CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_ID' in found_values}} - #: The preferred location id of the range - CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_ID = cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_ID{{endif}} + CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_ID = ( + cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_ID, + 'The preferred location id of the range\n' + ){{endif}} {{if 'CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_TYPE' in found_values}} - #: The last location type to which the range was prefetched - CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_TYPE = cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_TYPE{{endif}} + CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_TYPE = ( + cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_TYPE, + 'The last location type to which the range was prefetched\n' + ){{endif}} {{if 'CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_ID' in found_values}} - #: The last location id to which the range was prefetched - CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_ID = cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_ID{{endif}} + CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_ID = ( + cydriver.CUmem_range_attribute_enum.CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_ID, + 'The last location id to which the range was prefetched\n' + ){{endif}} -_dict_CUmem_range_attribute = dict(((int(v), v) for k, v in CUmem_range_attribute.__members__.items())) {{endif}} {{if 'CUjit_option_enum' in found_types}} -class CUjit_option(IntEnum): +class CUjit_option(_FastEnum): """ Online compiler and linker options """ {{if 'CU_JIT_MAX_REGISTERS' in found_values}} - #: Max number of registers that a thread may use. - #: Option type: unsigned int - #: Applies to: compiler only - CU_JIT_MAX_REGISTERS = cydriver.CUjit_option_enum.CU_JIT_MAX_REGISTERS{{endif}} + CU_JIT_MAX_REGISTERS = ( + cydriver.CUjit_option_enum.CU_JIT_MAX_REGISTERS, + 'Max number of registers that a thread may use.\n' + 'Option type: unsigned int\n' + 'Applies to: compiler only\n' + ){{endif}} {{if 'CU_JIT_THREADS_PER_BLOCK' in found_values}} - #: IN: Specifies minimum number of threads per block to target - #: compilation for - #: OUT: Returns the number of threads the compiler actually targeted. - #: This restricts the resource utilization of the compiler (e.g. max - #: registers) such that a block with the given number of threads should - #: be able to launch based on register limitations. Note, this option - #: does not currently take into account any other resource limitations, - #: such as shared memory utilization. - #: Cannot be combined with :py:obj:`~.CU_JIT_TARGET`. - #: Option type: unsigned int - #: Applies to: compiler only - CU_JIT_THREADS_PER_BLOCK = cydriver.CUjit_option_enum.CU_JIT_THREADS_PER_BLOCK{{endif}} + CU_JIT_THREADS_PER_BLOCK = ( + cydriver.CUjit_option_enum.CU_JIT_THREADS_PER_BLOCK, + 'IN: Specifies minimum number of threads per block to target compilation for\n' + 'OUT: Returns the number of threads the compiler actually targeted. This\n' + 'restricts the resource utilization of the compiler (e.g. max registers)\n' + 'such that a block with the given number of threads should be able to launch\n' + 'based on register limitations. Note, this option does not currently take\n' + 'into account any other resource limitations, such as shared memory\n' + 'utilization.\n' + 'Cannot be combined with :py:obj:`~.CU_JIT_TARGET`.\n' + 'Option type: unsigned int\n' + 'Applies to: compiler only\n' + ){{endif}} {{if 'CU_JIT_WALL_TIME' in found_values}} - #: Overwrites the option value with the total wall clock time, in - #: milliseconds, spent in the compiler and linker - #: Option type: float - #: Applies to: compiler and linker - CU_JIT_WALL_TIME = cydriver.CUjit_option_enum.CU_JIT_WALL_TIME{{endif}} + CU_JIT_WALL_TIME = ( + cydriver.CUjit_option_enum.CU_JIT_WALL_TIME, + 'Overwrites the option value with the total wall clock time, in\n' + 'milliseconds, spent in the compiler and linker\n' + 'Option type: float\n' + 'Applies to: compiler and linker\n' + ){{endif}} {{if 'CU_JIT_INFO_LOG_BUFFER' in found_values}} - #: Pointer to a buffer in which to print any log messages that are - #: informational in nature (the buffer size is specified via option - #: :py:obj:`~.CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES`) - #: Option type: char * - #: Applies to: compiler and linker - CU_JIT_INFO_LOG_BUFFER = cydriver.CUjit_option_enum.CU_JIT_INFO_LOG_BUFFER{{endif}} + CU_JIT_INFO_LOG_BUFFER = ( + cydriver.CUjit_option_enum.CU_JIT_INFO_LOG_BUFFER, + 'Pointer to a buffer in which to print any log messages that are\n' + 'informational in nature (the buffer size is specified via option\n' + ':py:obj:`~.CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES`)\n' + 'Option type: char *\n' + 'Applies to: compiler and linker\n' + ){{endif}} {{if 'CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES' in found_values}} - #: IN: Log buffer size in bytes. Log messages will be capped at this - #: size (including null terminator) - #: OUT: Amount of log buffer filled with messages - #: Option type: unsigned int - #: Applies to: compiler and linker - CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES = cydriver.CUjit_option_enum.CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES{{endif}} + CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES = ( + cydriver.CUjit_option_enum.CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES, + 'IN: Log buffer size in bytes. Log messages will be capped at this size\n' + '(including null terminator)\n' + 'OUT: Amount of log buffer filled with messages\n' + 'Option type: unsigned int\n' + 'Applies to: compiler and linker\n' + ){{endif}} {{if 'CU_JIT_ERROR_LOG_BUFFER' in found_values}} - #: Pointer to a buffer in which to print any log messages that reflect - #: errors (the buffer size is specified via option - #: :py:obj:`~.CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES`) - #: Option type: char * - #: Applies to: compiler and linker - CU_JIT_ERROR_LOG_BUFFER = cydriver.CUjit_option_enum.CU_JIT_ERROR_LOG_BUFFER{{endif}} + CU_JIT_ERROR_LOG_BUFFER = ( + cydriver.CUjit_option_enum.CU_JIT_ERROR_LOG_BUFFER, + 'Pointer to a buffer in which to print any log messages that reflect errors\n' + '(the buffer size is specified via option\n' + ':py:obj:`~.CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES`)\n' + 'Option type: char *\n' + 'Applies to: compiler and linker\n' + ){{endif}} {{if 'CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES' in found_values}} - #: IN: Log buffer size in bytes. Log messages will be capped at this - #: size (including null terminator) - #: OUT: Amount of log buffer filled with messages - #: Option type: unsigned int - #: Applies to: compiler and linker - CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES = cydriver.CUjit_option_enum.CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES{{endif}} + CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES = ( + cydriver.CUjit_option_enum.CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES, + 'IN: Log buffer size in bytes. Log messages will be capped at this size\n' + '(including null terminator)\n' + 'OUT: Amount of log buffer filled with messages\n' + 'Option type: unsigned int\n' + 'Applies to: compiler and linker\n' + ){{endif}} {{if 'CU_JIT_OPTIMIZATION_LEVEL' in found_values}} - #: Level of optimizations to apply to generated code (0 - 4), with 4 - #: being the default and highest level of optimizations. - #: Option type: unsigned int - #: Applies to: compiler only - CU_JIT_OPTIMIZATION_LEVEL = cydriver.CUjit_option_enum.CU_JIT_OPTIMIZATION_LEVEL{{endif}} + CU_JIT_OPTIMIZATION_LEVEL = ( + cydriver.CUjit_option_enum.CU_JIT_OPTIMIZATION_LEVEL, + 'Level of optimizations to apply to generated code (0 - 4), with 4 being the\n' + 'default and highest level of optimizations.\n' + 'Option type: unsigned int\n' + 'Applies to: compiler only\n' + ){{endif}} {{if 'CU_JIT_TARGET_FROM_CUCONTEXT' in found_values}} - #: No option value required. Determines the target based on the current - #: attached context (default) - #: Option type: No option value needed - #: Applies to: compiler and linker - CU_JIT_TARGET_FROM_CUCONTEXT = cydriver.CUjit_option_enum.CU_JIT_TARGET_FROM_CUCONTEXT{{endif}} + CU_JIT_TARGET_FROM_CUCONTEXT = ( + cydriver.CUjit_option_enum.CU_JIT_TARGET_FROM_CUCONTEXT, + 'No option value required. Determines the target based on the current\n' + 'attached context (default)\n' + 'Option type: No option value needed\n' + 'Applies to: compiler and linker\n' + ){{endif}} {{if 'CU_JIT_TARGET' in found_values}} - #: Target is chosen based on supplied :py:obj:`~.CUjit_target`. Cannot - #: be combined with :py:obj:`~.CU_JIT_THREADS_PER_BLOCK`. - #: Option type: unsigned int for enumerated type - #: :py:obj:`~.CUjit_target` - #: Applies to: compiler and linker - CU_JIT_TARGET = cydriver.CUjit_option_enum.CU_JIT_TARGET{{endif}} + CU_JIT_TARGET = ( + cydriver.CUjit_option_enum.CU_JIT_TARGET, + 'Target is chosen based on supplied :py:obj:`~.CUjit_target`. Cannot be\n' + 'combined with :py:obj:`~.CU_JIT_THREADS_PER_BLOCK`.\n' + 'Option type: unsigned int for enumerated type :py:obj:`~.CUjit_target`\n' + 'Applies to: compiler and linker\n' + ){{endif}} {{if 'CU_JIT_FALLBACK_STRATEGY' in found_values}} - #: Specifies choice of fallback strategy if matching cubin is not - #: found. Choice is based on supplied :py:obj:`~.CUjit_fallback`. This - #: option cannot be used with cuLink* APIs as the linker requires exact - #: matches. - #: Option type: unsigned int for enumerated type - #: :py:obj:`~.CUjit_fallback` - #: Applies to: compiler only - CU_JIT_FALLBACK_STRATEGY = cydriver.CUjit_option_enum.CU_JIT_FALLBACK_STRATEGY{{endif}} + CU_JIT_FALLBACK_STRATEGY = ( + cydriver.CUjit_option_enum.CU_JIT_FALLBACK_STRATEGY, + 'Specifies choice of fallback strategy if matching cubin is not found.\n' + 'Choice is based on supplied :py:obj:`~.CUjit_fallback`. This option cannot\n' + 'be used with cuLink* APIs as the linker requires exact matches.\n' + 'Option type: unsigned int for enumerated type :py:obj:`~.CUjit_fallback`\n' + 'Applies to: compiler only\n' + ){{endif}} {{if 'CU_JIT_GENERATE_DEBUG_INFO' in found_values}} - #: Specifies whether to create debug information in output (-g) (0: - #: false, default) - #: Option type: int - #: Applies to: compiler and linker - CU_JIT_GENERATE_DEBUG_INFO = cydriver.CUjit_option_enum.CU_JIT_GENERATE_DEBUG_INFO{{endif}} + CU_JIT_GENERATE_DEBUG_INFO = ( + cydriver.CUjit_option_enum.CU_JIT_GENERATE_DEBUG_INFO, + 'Specifies whether to create debug information in output (-g) (0: false,\n' + 'default)\n' + 'Option type: int\n' + 'Applies to: compiler and linker\n' + ){{endif}} {{if 'CU_JIT_LOG_VERBOSE' in found_values}} - #: Generate verbose log messages (0: false, default) - #: Option type: int - #: Applies to: compiler and linker - CU_JIT_LOG_VERBOSE = cydriver.CUjit_option_enum.CU_JIT_LOG_VERBOSE{{endif}} + CU_JIT_LOG_VERBOSE = ( + cydriver.CUjit_option_enum.CU_JIT_LOG_VERBOSE, + 'Generate verbose log messages (0: false, default)\n' + 'Option type: int\n' + 'Applies to: compiler and linker\n' + ){{endif}} {{if 'CU_JIT_GENERATE_LINE_INFO' in found_values}} - #: Generate line number information (-lineinfo) (0: false, default) - #: Option type: int - #: Applies to: compiler only - CU_JIT_GENERATE_LINE_INFO = cydriver.CUjit_option_enum.CU_JIT_GENERATE_LINE_INFO{{endif}} + CU_JIT_GENERATE_LINE_INFO = ( + cydriver.CUjit_option_enum.CU_JIT_GENERATE_LINE_INFO, + 'Generate line number information (-lineinfo) (0: false, default)\n' + 'Option type: int\n' + 'Applies to: compiler only\n' + ){{endif}} {{if 'CU_JIT_CACHE_MODE' in found_values}} - #: Specifies whether to enable caching explicitly (-dlcm) - #: Choice is based on supplied :py:obj:`~.CUjit_cacheMode_enum`. - #: Option type: unsigned int for enumerated type - #: :py:obj:`~.CUjit_cacheMode_enum` - #: Applies to: compiler only - CU_JIT_CACHE_MODE = cydriver.CUjit_option_enum.CU_JIT_CACHE_MODE{{endif}} + CU_JIT_CACHE_MODE = ( + cydriver.CUjit_option_enum.CU_JIT_CACHE_MODE, + 'Specifies whether to enable caching explicitly (-dlcm)\n' + 'Choice is based on supplied :py:obj:`~.CUjit_cacheMode_enum`.\n' + 'Option type: unsigned int for enumerated type\n' + ':py:obj:`~.CUjit_cacheMode_enum`\n' + 'Applies to: compiler only\n' + ){{endif}} {{if 'CU_JIT_NEW_SM3X_OPT' in found_values}} - #: [Deprecated] - CU_JIT_NEW_SM3X_OPT = cydriver.CUjit_option_enum.CU_JIT_NEW_SM3X_OPT{{endif}} + CU_JIT_NEW_SM3X_OPT = ( + cydriver.CUjit_option_enum.CU_JIT_NEW_SM3X_OPT, + '[Deprecated]\n' + ){{endif}} {{if 'CU_JIT_FAST_COMPILE' in found_values}} - #: This jit option is used for internal purpose only. - CU_JIT_FAST_COMPILE = cydriver.CUjit_option_enum.CU_JIT_FAST_COMPILE{{endif}} + CU_JIT_FAST_COMPILE = ( + cydriver.CUjit_option_enum.CU_JIT_FAST_COMPILE, + 'This jit option is used for internal purpose only.\n' + ){{endif}} {{if 'CU_JIT_GLOBAL_SYMBOL_NAMES' in found_values}} - #: Array of device symbol names that will be relocated to the - #: corresponding host addresses stored in - #: :py:obj:`~.CU_JIT_GLOBAL_SYMBOL_ADDRESSES`. - #: Must contain :py:obj:`~.CU_JIT_GLOBAL_SYMBOL_COUNT` entries. - #: When loading a device module, driver will relocate all encountered - #: unresolved symbols to the host addresses. - #: It is only allowed to register symbols that correspond to unresolved - #: global variables. - #: It is illegal to register the same device symbol at multiple - #: addresses. - #: Option type: const char ** - #: Applies to: dynamic linker only - CU_JIT_GLOBAL_SYMBOL_NAMES = cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_NAMES{{endif}} + CU_JIT_GLOBAL_SYMBOL_NAMES = ( + cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_NAMES, + 'Array of device symbol names that will be relocated to the corresponding\n' + 'host addresses stored in :py:obj:`~.CU_JIT_GLOBAL_SYMBOL_ADDRESSES`.\n' + 'Must contain :py:obj:`~.CU_JIT_GLOBAL_SYMBOL_COUNT` entries.\n' + 'When loading a device module, driver will relocate all encountered\n' + 'unresolved symbols to the host addresses.\n' + 'It is only allowed to register symbols that correspond to unresolved global\n' + 'variables.\n' + 'It is illegal to register the same device symbol at multiple addresses.\n' + 'Option type: const char **\n' + 'Applies to: dynamic linker only\n' + ){{endif}} {{if 'CU_JIT_GLOBAL_SYMBOL_ADDRESSES' in found_values}} - #: Array of host addresses that will be used to relocate corresponding - #: device symbols stored in :py:obj:`~.CU_JIT_GLOBAL_SYMBOL_NAMES`. - #: Must contain :py:obj:`~.CU_JIT_GLOBAL_SYMBOL_COUNT` entries. - #: Option type: void ** - #: Applies to: dynamic linker only - CU_JIT_GLOBAL_SYMBOL_ADDRESSES = cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_ADDRESSES{{endif}} + CU_JIT_GLOBAL_SYMBOL_ADDRESSES = ( + cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_ADDRESSES, + 'Array of host addresses that will be used to relocate corresponding device\n' + 'symbols stored in :py:obj:`~.CU_JIT_GLOBAL_SYMBOL_NAMES`.\n' + 'Must contain :py:obj:`~.CU_JIT_GLOBAL_SYMBOL_COUNT` entries.\n' + 'Option type: void **\n' + 'Applies to: dynamic linker only\n' + ){{endif}} {{if 'CU_JIT_GLOBAL_SYMBOL_COUNT' in found_values}} - #: Number of entries in :py:obj:`~.CU_JIT_GLOBAL_SYMBOL_NAMES` and - #: :py:obj:`~.CU_JIT_GLOBAL_SYMBOL_ADDRESSES` arrays. - #: Option type: unsigned int - #: Applies to: dynamic linker only - CU_JIT_GLOBAL_SYMBOL_COUNT = cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_COUNT{{endif}} + CU_JIT_GLOBAL_SYMBOL_COUNT = ( + cydriver.CUjit_option_enum.CU_JIT_GLOBAL_SYMBOL_COUNT, + 'Number of entries in :py:obj:`~.CU_JIT_GLOBAL_SYMBOL_NAMES` and\n' + ':py:obj:`~.CU_JIT_GLOBAL_SYMBOL_ADDRESSES` arrays.\n' + 'Option type: unsigned int\n' + 'Applies to: dynamic linker only\n' + ){{endif}} {{if 'CU_JIT_LTO' in found_values}} - #: [Deprecated] - #: - #: Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0 - CU_JIT_LTO = cydriver.CUjit_option_enum.CU_JIT_LTO{{endif}} + CU_JIT_LTO = ( + cydriver.CUjit_option_enum.CU_JIT_LTO, + '[Deprecated]\n' + 'Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0\n' + ){{endif}} {{if 'CU_JIT_FTZ' in found_values}} - #: [Deprecated] - #: - #: Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0 - CU_JIT_FTZ = cydriver.CUjit_option_enum.CU_JIT_FTZ{{endif}} + CU_JIT_FTZ = ( + cydriver.CUjit_option_enum.CU_JIT_FTZ, + '[Deprecated]\n' + 'Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0\n' + ){{endif}} {{if 'CU_JIT_PREC_DIV' in found_values}} - #: [Deprecated] - #: - #: Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0 - CU_JIT_PREC_DIV = cydriver.CUjit_option_enum.CU_JIT_PREC_DIV{{endif}} + CU_JIT_PREC_DIV = ( + cydriver.CUjit_option_enum.CU_JIT_PREC_DIV, + '[Deprecated]\n' + 'Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0\n' + ){{endif}} {{if 'CU_JIT_PREC_SQRT' in found_values}} - #: [Deprecated] - #: - #: Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0 - CU_JIT_PREC_SQRT = cydriver.CUjit_option_enum.CU_JIT_PREC_SQRT{{endif}} + CU_JIT_PREC_SQRT = ( + cydriver.CUjit_option_enum.CU_JIT_PREC_SQRT, + '[Deprecated]\n' + 'Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0\n' + ){{endif}} {{if 'CU_JIT_FMA' in found_values}} - #: [Deprecated] - #: - #: Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0 - CU_JIT_FMA = cydriver.CUjit_option_enum.CU_JIT_FMA{{endif}} + CU_JIT_FMA = ( + cydriver.CUjit_option_enum.CU_JIT_FMA, + '[Deprecated]\n' + 'Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0\n' + ){{endif}} {{if 'CU_JIT_REFERENCED_KERNEL_NAMES' in found_values}} - #: [Deprecated] - #: - #: Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0 - CU_JIT_REFERENCED_KERNEL_NAMES = cydriver.CUjit_option_enum.CU_JIT_REFERENCED_KERNEL_NAMES{{endif}} + CU_JIT_REFERENCED_KERNEL_NAMES = ( + cydriver.CUjit_option_enum.CU_JIT_REFERENCED_KERNEL_NAMES, + '[Deprecated]\n' + 'Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0\n' + ){{endif}} {{if 'CU_JIT_REFERENCED_KERNEL_COUNT' in found_values}} - #: [Deprecated] - #: - #: Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0 - CU_JIT_REFERENCED_KERNEL_COUNT = cydriver.CUjit_option_enum.CU_JIT_REFERENCED_KERNEL_COUNT{{endif}} + CU_JIT_REFERENCED_KERNEL_COUNT = ( + cydriver.CUjit_option_enum.CU_JIT_REFERENCED_KERNEL_COUNT, + '[Deprecated]\n' + 'Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0\n' + ){{endif}} {{if 'CU_JIT_REFERENCED_VARIABLE_NAMES' in found_values}} - #: [Deprecated] - #: - #: Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0 - CU_JIT_REFERENCED_VARIABLE_NAMES = cydriver.CUjit_option_enum.CU_JIT_REFERENCED_VARIABLE_NAMES{{endif}} + CU_JIT_REFERENCED_VARIABLE_NAMES = ( + cydriver.CUjit_option_enum.CU_JIT_REFERENCED_VARIABLE_NAMES, + '[Deprecated]\n' + 'Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0\n' + ){{endif}} {{if 'CU_JIT_REFERENCED_VARIABLE_COUNT' in found_values}} - #: [Deprecated] - #: - #: Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0 - CU_JIT_REFERENCED_VARIABLE_COUNT = cydriver.CUjit_option_enum.CU_JIT_REFERENCED_VARIABLE_COUNT{{endif}} + CU_JIT_REFERENCED_VARIABLE_COUNT = ( + cydriver.CUjit_option_enum.CU_JIT_REFERENCED_VARIABLE_COUNT, + '[Deprecated]\n' + 'Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0\n' + ){{endif}} {{if 'CU_JIT_OPTIMIZE_UNUSED_DEVICE_VARIABLES' in found_values}} - #: [Deprecated] - #: - #: Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0 - CU_JIT_OPTIMIZE_UNUSED_DEVICE_VARIABLES = cydriver.CUjit_option_enum.CU_JIT_OPTIMIZE_UNUSED_DEVICE_VARIABLES{{endif}} + CU_JIT_OPTIMIZE_UNUSED_DEVICE_VARIABLES = ( + cydriver.CUjit_option_enum.CU_JIT_OPTIMIZE_UNUSED_DEVICE_VARIABLES, + '[Deprecated]\n' + 'Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0\n' + ){{endif}} {{if 'CU_JIT_POSITION_INDEPENDENT_CODE' in found_values}} - #: Generate position independent code (0: false) - #: Option type: int - #: Applies to: compiler only - CU_JIT_POSITION_INDEPENDENT_CODE = cydriver.CUjit_option_enum.CU_JIT_POSITION_INDEPENDENT_CODE{{endif}} + CU_JIT_POSITION_INDEPENDENT_CODE = ( + cydriver.CUjit_option_enum.CU_JIT_POSITION_INDEPENDENT_CODE, + 'Generate position independent code (0: false)\n' + 'Option type: int\n' + 'Applies to: compiler only\n' + ){{endif}} {{if 'CU_JIT_MIN_CTA_PER_SM' in found_values}} - #: This option hints to the JIT compiler the minimum number of CTAs - #: from the kernel’s grid to be mapped to a SM. This option is ignored - #: when used together with :py:obj:`~.CU_JIT_MAX_REGISTERS` or - #: :py:obj:`~.CU_JIT_THREADS_PER_BLOCK`. Optimizations based on this - #: option need :py:obj:`~.CU_JIT_MAX_THREADS_PER_BLOCK` to be specified - #: as well. For kernels already using PTX directive .minnctapersm, this - #: option will be ignored by default. Use - #: :py:obj:`~.CU_JIT_OVERRIDE_DIRECTIVE_VALUES` to let this option take - #: precedence over the PTX directive. Option type: unsigned int - #: Applies to: compiler only - CU_JIT_MIN_CTA_PER_SM = cydriver.CUjit_option_enum.CU_JIT_MIN_CTA_PER_SM{{endif}} + CU_JIT_MIN_CTA_PER_SM = ( + cydriver.CUjit_option_enum.CU_JIT_MIN_CTA_PER_SM, + 'This option hints to the JIT compiler the minimum number of CTAs from the\n' + 'kernel’s grid to be mapped to a SM. This option is ignored when used\n' + 'together with :py:obj:`~.CU_JIT_MAX_REGISTERS` or\n' + ':py:obj:`~.CU_JIT_THREADS_PER_BLOCK`. Optimizations based on this option\n' + 'need :py:obj:`~.CU_JIT_MAX_THREADS_PER_BLOCK` to be specified as well. For\n' + 'kernels already using PTX directive .minnctapersm, this option will be\n' + 'ignored by default. Use :py:obj:`~.CU_JIT_OVERRIDE_DIRECTIVE_VALUES` to let\n' + 'this option take precedence over the PTX directive. Option type: unsigned\n' + 'int\n' + 'Applies to: compiler only\n' + ){{endif}} {{if 'CU_JIT_MAX_THREADS_PER_BLOCK' in found_values}} - #: Maximum number threads in a thread block, computed as the product of - #: the maximum extent specifed for each dimension of the block. This - #: limit is guaranteed not to be exeeded in any invocation of the - #: kernel. Exceeding the the maximum number of threads results in - #: runtime error or kernel launch failure. For kernels already using - #: PTX directive .maxntid, this option will be ignored by default. Use - #: :py:obj:`~.CU_JIT_OVERRIDE_DIRECTIVE_VALUES` to let this option take - #: precedence over the PTX directive. Option type: int - #: Applies to: compiler only - CU_JIT_MAX_THREADS_PER_BLOCK = cydriver.CUjit_option_enum.CU_JIT_MAX_THREADS_PER_BLOCK{{endif}} + CU_JIT_MAX_THREADS_PER_BLOCK = ( + cydriver.CUjit_option_enum.CU_JIT_MAX_THREADS_PER_BLOCK, + 'Maximum number threads in a thread block, computed as the product of the\n' + 'maximum extent specifed for each dimension of the block. This limit is\n' + 'guaranteed not to be exeeded in any invocation of the kernel. Exceeding the\n' + 'the maximum number of threads results in runtime error or kernel launch\n' + 'failure. For kernels already using PTX directive .maxntid, this option will\n' + 'be ignored by default. Use :py:obj:`~.CU_JIT_OVERRIDE_DIRECTIVE_VALUES` to\n' + 'let this option take precedence over the PTX directive. Option type: int\n' + 'Applies to: compiler only\n' + ){{endif}} {{if 'CU_JIT_OVERRIDE_DIRECTIVE_VALUES' in found_values}} - #: This option lets the values specified using - #: :py:obj:`~.CU_JIT_MAX_REGISTERS`, - #: :py:obj:`~.CU_JIT_THREADS_PER_BLOCK`, - #: :py:obj:`~.CU_JIT_MAX_THREADS_PER_BLOCK` and - #: :py:obj:`~.CU_JIT_MIN_CTA_PER_SM` take precedence over any PTX - #: directives. (0: Disable, default; 1: Enable) Option type: int - #: Applies to: compiler only - CU_JIT_OVERRIDE_DIRECTIVE_VALUES = cydriver.CUjit_option_enum.CU_JIT_OVERRIDE_DIRECTIVE_VALUES{{endif}} + CU_JIT_OVERRIDE_DIRECTIVE_VALUES = ( + cydriver.CUjit_option_enum.CU_JIT_OVERRIDE_DIRECTIVE_VALUES, + 'This option lets the values specified using\n' + ':py:obj:`~.CU_JIT_MAX_REGISTERS`, :py:obj:`~.CU_JIT_THREADS_PER_BLOCK`,\n' + ':py:obj:`~.CU_JIT_MAX_THREADS_PER_BLOCK` and\n' + ':py:obj:`~.CU_JIT_MIN_CTA_PER_SM` take precedence over any PTX directives.\n' + '(0: Disable, default; 1: Enable) Option type: int\n' + 'Applies to: compiler only\n' + ){{endif}} {{if 'CU_JIT_SPLIT_COMPILE' in found_values}} - #: This option specifies the maximum number of concurrent threads to - #: use when running compiler optimizations. If the specified value is - #: 1, the option will be ignored. If the specified value is 0, the - #: number of threads will match the number of CPUs on the underlying - #: machine. Otherwise, if the option is N, then up to N threads will be - #: used. Option type: unsigned int - #: Applies to: compiler only - CU_JIT_SPLIT_COMPILE = cydriver.CUjit_option_enum.CU_JIT_SPLIT_COMPILE{{endif}} + CU_JIT_SPLIT_COMPILE = ( + cydriver.CUjit_option_enum.CU_JIT_SPLIT_COMPILE, + 'This option specifies the maximum number of concurrent threads to use when\n' + 'running compiler optimizations. If the specified value is 1, the option\n' + 'will be ignored. If the specified value is 0, the number of threads will\n' + 'match the number of CPUs on the underlying machine. Otherwise, if the\n' + 'option is N, then up to N threads will be used. Option type: unsigned int\n' + 'Applies to: compiler only\n' + ){{endif}} {{if 'CU_JIT_BINARY_LOADER_THREAD_COUNT' in found_values}} - #: This option specifies the maximum number of concurrent threads to - #: use when compiling device code. If the specified value is 1, the - #: option will be ignored. If the specified value is 0, the number of - #: threads will match the number of CPUs on the underlying machine. - #: Otherwise, if the option is N, then up to N threads will be used. - #: This option is ignored if the env var - #: CUDA_BINARY_LOADER_THREAD_COUNT is set. Option type: unsigned int - #: Applies to: compiler and linker - CU_JIT_BINARY_LOADER_THREAD_COUNT = cydriver.CUjit_option_enum.CU_JIT_BINARY_LOADER_THREAD_COUNT{{endif}} + CU_JIT_BINARY_LOADER_THREAD_COUNT = ( + cydriver.CUjit_option_enum.CU_JIT_BINARY_LOADER_THREAD_COUNT, + 'This option specifies the maximum number of concurrent threads to use when\n' + 'compiling device code. If the specified value is 1, the option will be\n' + 'ignored. If the specified value is 0, the number of threads will match the\n' + 'number of CPUs on the underlying machine. Otherwise, if the option is N,\n' + 'then up to N threads will be used. This option is ignored if the env var\n' + 'CUDA_BINARY_LOADER_THREAD_COUNT is set. Option type: unsigned int\n' + 'Applies to: compiler and linker\n' + ){{endif}} {{if 'CU_JIT_NUM_OPTIONS' in found_values}} CU_JIT_NUM_OPTIONS = cydriver.CUjit_option_enum.CU_JIT_NUM_OPTIONS{{endif}} -_dict_CUjit_option = dict(((int(v), v) for k, v in CUjit_option.__members__.items())) {{endif}} {{if 'CUjit_target_enum' in found_types}} -class CUjit_target(IntEnum): +class CUjit_target(_FastEnum): """ Online compilation targets """ {{if 'CU_TARGET_COMPUTE_30' in found_values}} - #: Compute device class 3.0 - CU_TARGET_COMPUTE_30 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_30{{endif}} + CU_TARGET_COMPUTE_30 = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_30, + 'Compute device class 3.0\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_32' in found_values}} - #: Compute device class 3.2 - CU_TARGET_COMPUTE_32 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_32{{endif}} + CU_TARGET_COMPUTE_32 = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_32, + 'Compute device class 3.2\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_35' in found_values}} - #: Compute device class 3.5 - CU_TARGET_COMPUTE_35 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_35{{endif}} + CU_TARGET_COMPUTE_35 = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_35, + 'Compute device class 3.5\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_37' in found_values}} - #: Compute device class 3.7 - CU_TARGET_COMPUTE_37 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_37{{endif}} + CU_TARGET_COMPUTE_37 = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_37, + 'Compute device class 3.7\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_50' in found_values}} - #: Compute device class 5.0 - CU_TARGET_COMPUTE_50 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_50{{endif}} + CU_TARGET_COMPUTE_50 = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_50, + 'Compute device class 5.0\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_52' in found_values}} - #: Compute device class 5.2 - CU_TARGET_COMPUTE_52 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_52{{endif}} + CU_TARGET_COMPUTE_52 = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_52, + 'Compute device class 5.2\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_53' in found_values}} - #: Compute device class 5.3 - CU_TARGET_COMPUTE_53 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_53{{endif}} + CU_TARGET_COMPUTE_53 = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_53, + 'Compute device class 5.3\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_60' in found_values}} - #: Compute device class 6.0. - CU_TARGET_COMPUTE_60 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_60{{endif}} + CU_TARGET_COMPUTE_60 = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_60, + 'Compute device class 6.0.\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_61' in found_values}} - #: Compute device class 6.1. - CU_TARGET_COMPUTE_61 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_61{{endif}} + CU_TARGET_COMPUTE_61 = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_61, + 'Compute device class 6.1.\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_62' in found_values}} - #: Compute device class 6.2. - CU_TARGET_COMPUTE_62 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_62{{endif}} + CU_TARGET_COMPUTE_62 = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_62, + 'Compute device class 6.2.\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_70' in found_values}} - #: Compute device class 7.0. - CU_TARGET_COMPUTE_70 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_70{{endif}} + CU_TARGET_COMPUTE_70 = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_70, + 'Compute device class 7.0.\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_72' in found_values}} - #: Compute device class 7.2. - CU_TARGET_COMPUTE_72 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_72{{endif}} + CU_TARGET_COMPUTE_72 = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_72, + 'Compute device class 7.2.\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_75' in found_values}} - #: Compute device class 7.5. - CU_TARGET_COMPUTE_75 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_75{{endif}} + CU_TARGET_COMPUTE_75 = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_75, + 'Compute device class 7.5.\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_80' in found_values}} - #: Compute device class 8.0. - CU_TARGET_COMPUTE_80 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_80{{endif}} + CU_TARGET_COMPUTE_80 = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_80, + 'Compute device class 8.0.\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_86' in found_values}} - #: Compute device class 8.6. - CU_TARGET_COMPUTE_86 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_86{{endif}} + CU_TARGET_COMPUTE_86 = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_86, + 'Compute device class 8.6.\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_87' in found_values}} - #: Compute device class 8.7. - CU_TARGET_COMPUTE_87 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_87{{endif}} + CU_TARGET_COMPUTE_87 = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_87, + 'Compute device class 8.7.\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_89' in found_values}} - #: Compute device class 8.9. - CU_TARGET_COMPUTE_89 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_89{{endif}} + CU_TARGET_COMPUTE_89 = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_89, + 'Compute device class 8.9.\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_90' in found_values}} - #: Compute device class 9.0. - CU_TARGET_COMPUTE_90 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_90{{endif}} + CU_TARGET_COMPUTE_90 = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_90, + 'Compute device class 9.0.\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_100' in found_values}} - #: Compute device class 10.0. - CU_TARGET_COMPUTE_100 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_100{{endif}} + CU_TARGET_COMPUTE_100 = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_100, + 'Compute device class 10.0.\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_103' in found_values}} - #: Compute device class 10.3. - CU_TARGET_COMPUTE_103 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_103{{endif}} + CU_TARGET_COMPUTE_103 = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_103, + 'Compute device class 10.3.\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_110' in found_values}} - #: Compute device class 11.0. - CU_TARGET_COMPUTE_110 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_110{{endif}} + CU_TARGET_COMPUTE_110 = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_110, + 'Compute device class 11.0.\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_120' in found_values}} - #: Compute device class 12.0. - CU_TARGET_COMPUTE_120 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_120{{endif}} + CU_TARGET_COMPUTE_120 = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_120, + 'Compute device class 12.0.\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_121' in found_values}} - #: Compute device class 12.1. Compute device class 9.0. with - #: accelerated features. - CU_TARGET_COMPUTE_121 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_121{{endif}} + CU_TARGET_COMPUTE_121 = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_121, + 'Compute device class 12.1. Compute device class 9.0. with accelerated\n' + 'features.\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_90A' in found_values}} - #: Compute device class 10.0. with accelerated features. - CU_TARGET_COMPUTE_90A = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_90A{{endif}} + CU_TARGET_COMPUTE_90A = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_90A, + 'Compute device class 10.0. with accelerated features.\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_100A' in found_values}} - #: Compute device class 11.0 with accelerated features. - CU_TARGET_COMPUTE_100A = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_100A{{endif}} + CU_TARGET_COMPUTE_100A = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_100A, + 'Compute device class 11.0 with accelerated features.\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_103A' in found_values}} - #: Compute device class 12.0. with accelerated features. - CU_TARGET_COMPUTE_103A = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_103A{{endif}} + CU_TARGET_COMPUTE_103A = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_103A, + 'Compute device class 12.0. with accelerated features.\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_110A' in found_values}} - #: Compute device class 10.3. with accelerated features. - CU_TARGET_COMPUTE_110A = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_110A{{endif}} + CU_TARGET_COMPUTE_110A = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_110A, + 'Compute device class 10.3. with accelerated features.\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_120A' in found_values}} - #: Compute device class 12.1. with accelerated features. - CU_TARGET_COMPUTE_120A = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_120A{{endif}} + CU_TARGET_COMPUTE_120A = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_120A, + 'Compute device class 12.1. with accelerated features.\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_121A' in found_values}} - #: Compute device class 10.x with family features. - CU_TARGET_COMPUTE_121A = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_121A{{endif}} + CU_TARGET_COMPUTE_121A = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_121A, + 'Compute device class 10.x with family features.\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_100F' in found_values}} - #: Compute device class 11.0 with family features. - CU_TARGET_COMPUTE_100F = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_100F{{endif}} + CU_TARGET_COMPUTE_100F = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_100F, + 'Compute device class 11.0 with family features.\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_103F' in found_values}} - #: Compute device class 12.0. with family features. - CU_TARGET_COMPUTE_103F = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_103F{{endif}} + CU_TARGET_COMPUTE_103F = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_103F, + 'Compute device class 12.0. with family features.\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_110F' in found_values}} - #: Compute device class 10.3. with family features. - CU_TARGET_COMPUTE_110F = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_110F{{endif}} + CU_TARGET_COMPUTE_110F = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_110F, + 'Compute device class 10.3. with family features.\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_120F' in found_values}} - #: Compute device class 12.1. with family features. - CU_TARGET_COMPUTE_120F = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_120F{{endif}} + CU_TARGET_COMPUTE_120F = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_120F, + 'Compute device class 12.1. with family features.\n' + ){{endif}} {{if 'CU_TARGET_COMPUTE_121F' in found_values}} CU_TARGET_COMPUTE_121F = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_121F{{endif}} -_dict_CUjit_target = dict(((int(v), v) for k, v in CUjit_target.__members__.items())) {{endif}} {{if 'CUjit_fallback_enum' in found_types}} -class CUjit_fallback(IntEnum): +class CUjit_fallback(_FastEnum): """ Cubin matching fallback strategies """ {{if 'CU_PREFER_PTX' in found_values}} - #: Prefer to compile ptx if exact binary match not found - CU_PREFER_PTX = cydriver.CUjit_fallback_enum.CU_PREFER_PTX{{endif}} + CU_PREFER_PTX = ( + cydriver.CUjit_fallback_enum.CU_PREFER_PTX, + 'Prefer to compile ptx if exact binary match not found\n' + ){{endif}} {{if 'CU_PREFER_BINARY' in found_values}} - #: Prefer to fall back to compatible binary code if exact match not - #: found - CU_PREFER_BINARY = cydriver.CUjit_fallback_enum.CU_PREFER_BINARY{{endif}} + CU_PREFER_BINARY = ( + cydriver.CUjit_fallback_enum.CU_PREFER_BINARY, + 'Prefer to fall back to compatible binary code if exact match not found\n' + ){{endif}} -_dict_CUjit_fallback = dict(((int(v), v) for k, v in CUjit_fallback.__members__.items())) {{endif}} {{if 'CUjit_cacheMode_enum' in found_types}} -class CUjit_cacheMode(IntEnum): +class CUjit_cacheMode(_FastEnum): """ Caching modes for dlcm """ {{if 'CU_JIT_CACHE_OPTION_NONE' in found_values}} - #: Compile with no -dlcm flag specified - CU_JIT_CACHE_OPTION_NONE = cydriver.CUjit_cacheMode_enum.CU_JIT_CACHE_OPTION_NONE{{endif}} + CU_JIT_CACHE_OPTION_NONE = ( + cydriver.CUjit_cacheMode_enum.CU_JIT_CACHE_OPTION_NONE, + 'Compile with no -dlcm flag specified\n' + ){{endif}} {{if 'CU_JIT_CACHE_OPTION_CG' in found_values}} - #: Compile with L1 cache disabled - CU_JIT_CACHE_OPTION_CG = cydriver.CUjit_cacheMode_enum.CU_JIT_CACHE_OPTION_CG{{endif}} + CU_JIT_CACHE_OPTION_CG = ( + cydriver.CUjit_cacheMode_enum.CU_JIT_CACHE_OPTION_CG, + 'Compile with L1 cache disabled\n' + ){{endif}} {{if 'CU_JIT_CACHE_OPTION_CA' in found_values}} - #: Compile with L1 cache enabled - CU_JIT_CACHE_OPTION_CA = cydriver.CUjit_cacheMode_enum.CU_JIT_CACHE_OPTION_CA{{endif}} + CU_JIT_CACHE_OPTION_CA = ( + cydriver.CUjit_cacheMode_enum.CU_JIT_CACHE_OPTION_CA, + 'Compile with L1 cache enabled\n' + ){{endif}} -_dict_CUjit_cacheMode = dict(((int(v), v) for k, v in CUjit_cacheMode.__members__.items())) {{endif}} {{if 'CUjitInputType_enum' in found_types}} -class CUjitInputType(IntEnum): +class CUjitInputType(_FastEnum): """ Device code formats """ {{if 'CU_JIT_INPUT_CUBIN' in found_values}} - #: Compiled device-class-specific device code - #: Applicable options: none - CU_JIT_INPUT_CUBIN = cydriver.CUjitInputType_enum.CU_JIT_INPUT_CUBIN{{endif}} + CU_JIT_INPUT_CUBIN = ( + cydriver.CUjitInputType_enum.CU_JIT_INPUT_CUBIN, + 'Compiled device-class-specific device code\n' + 'Applicable options: none\n' + ){{endif}} {{if 'CU_JIT_INPUT_PTX' in found_values}} - #: PTX source code - #: Applicable options: PTX compiler options - CU_JIT_INPUT_PTX = cydriver.CUjitInputType_enum.CU_JIT_INPUT_PTX{{endif}} + CU_JIT_INPUT_PTX = ( + cydriver.CUjitInputType_enum.CU_JIT_INPUT_PTX, + 'PTX source code\n' + 'Applicable options: PTX compiler options\n' + ){{endif}} {{if 'CU_JIT_INPUT_FATBINARY' in found_values}} - #: Bundle of multiple cubins and/or PTX of some device code - #: Applicable options: PTX compiler options, - #: :py:obj:`~.CU_JIT_FALLBACK_STRATEGY` - CU_JIT_INPUT_FATBINARY = cydriver.CUjitInputType_enum.CU_JIT_INPUT_FATBINARY{{endif}} + CU_JIT_INPUT_FATBINARY = ( + cydriver.CUjitInputType_enum.CU_JIT_INPUT_FATBINARY, + 'Bundle of multiple cubins and/or PTX of some device code\n' + 'Applicable options: PTX compiler options,\n' + ':py:obj:`~.CU_JIT_FALLBACK_STRATEGY`\n' + ){{endif}} {{if 'CU_JIT_INPUT_OBJECT' in found_values}} - #: Host object with embedded device code - #: Applicable options: PTX compiler options, - #: :py:obj:`~.CU_JIT_FALLBACK_STRATEGY` - CU_JIT_INPUT_OBJECT = cydriver.CUjitInputType_enum.CU_JIT_INPUT_OBJECT{{endif}} + CU_JIT_INPUT_OBJECT = ( + cydriver.CUjitInputType_enum.CU_JIT_INPUT_OBJECT, + 'Host object with embedded device code\n' + 'Applicable options: PTX compiler options,\n' + ':py:obj:`~.CU_JIT_FALLBACK_STRATEGY`\n' + ){{endif}} {{if 'CU_JIT_INPUT_LIBRARY' in found_values}} - #: Archive of host objects with embedded device code - #: Applicable options: PTX compiler options, - #: :py:obj:`~.CU_JIT_FALLBACK_STRATEGY` - CU_JIT_INPUT_LIBRARY = cydriver.CUjitInputType_enum.CU_JIT_INPUT_LIBRARY{{endif}} + CU_JIT_INPUT_LIBRARY = ( + cydriver.CUjitInputType_enum.CU_JIT_INPUT_LIBRARY, + 'Archive of host objects with embedded device code\n' + 'Applicable options: PTX compiler options,\n' + ':py:obj:`~.CU_JIT_FALLBACK_STRATEGY`\n' + ){{endif}} {{if 'CU_JIT_INPUT_NVVM' in found_values}} - #: [Deprecated] - #: - #: Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0 - CU_JIT_INPUT_NVVM = cydriver.CUjitInputType_enum.CU_JIT_INPUT_NVVM{{endif}} + CU_JIT_INPUT_NVVM = ( + cydriver.CUjitInputType_enum.CU_JIT_INPUT_NVVM, + '[Deprecated]\n' + 'Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0\n' + ){{endif}} {{if 'CU_JIT_NUM_INPUT_TYPES' in found_values}} CU_JIT_NUM_INPUT_TYPES = cydriver.CUjitInputType_enum.CU_JIT_NUM_INPUT_TYPES{{endif}} -_dict_CUjitInputType = dict(((int(v), v) for k, v in CUjitInputType.__members__.items())) {{endif}} {{if 'CUgraphicsRegisterFlags_enum' in found_types}} -class CUgraphicsRegisterFlags(IntEnum): +class CUgraphicsRegisterFlags(_FastEnum): """ Flags to register a graphics resource """ @@ -2855,11 +3608,10 @@ class CUgraphicsRegisterFlags(IntEnum): {{if 'CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER' in found_values}} CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER = cydriver.CUgraphicsRegisterFlags_enum.CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER{{endif}} -_dict_CUgraphicsRegisterFlags = dict(((int(v), v) for k, v in CUgraphicsRegisterFlags.__members__.items())) {{endif}} {{if 'CUgraphicsMapResourceFlags_enum' in found_types}} -class CUgraphicsMapResourceFlags(IntEnum): +class CUgraphicsMapResourceFlags(_FastEnum): """ Flags for mapping and unmapping interop resources """ @@ -2870,322 +3622,405 @@ class CUgraphicsMapResourceFlags(IntEnum): {{if 'CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD' in found_values}} CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD = cydriver.CUgraphicsMapResourceFlags_enum.CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD{{endif}} -_dict_CUgraphicsMapResourceFlags = dict(((int(v), v) for k, v in CUgraphicsMapResourceFlags.__members__.items())) {{endif}} {{if 'CUarray_cubemap_face_enum' in found_types}} -class CUarray_cubemap_face(IntEnum): +class CUarray_cubemap_face(_FastEnum): """ Array indices for cube faces """ {{if 'CU_CUBEMAP_FACE_POSITIVE_X' in found_values}} - #: Positive X face of cubemap - CU_CUBEMAP_FACE_POSITIVE_X = cydriver.CUarray_cubemap_face_enum.CU_CUBEMAP_FACE_POSITIVE_X{{endif}} + CU_CUBEMAP_FACE_POSITIVE_X = ( + cydriver.CUarray_cubemap_face_enum.CU_CUBEMAP_FACE_POSITIVE_X, + 'Positive X face of cubemap\n' + ){{endif}} {{if 'CU_CUBEMAP_FACE_NEGATIVE_X' in found_values}} - #: Negative X face of cubemap - CU_CUBEMAP_FACE_NEGATIVE_X = cydriver.CUarray_cubemap_face_enum.CU_CUBEMAP_FACE_NEGATIVE_X{{endif}} + CU_CUBEMAP_FACE_NEGATIVE_X = ( + cydriver.CUarray_cubemap_face_enum.CU_CUBEMAP_FACE_NEGATIVE_X, + 'Negative X face of cubemap\n' + ){{endif}} {{if 'CU_CUBEMAP_FACE_POSITIVE_Y' in found_values}} - #: Positive Y face of cubemap - CU_CUBEMAP_FACE_POSITIVE_Y = cydriver.CUarray_cubemap_face_enum.CU_CUBEMAP_FACE_POSITIVE_Y{{endif}} + CU_CUBEMAP_FACE_POSITIVE_Y = ( + cydriver.CUarray_cubemap_face_enum.CU_CUBEMAP_FACE_POSITIVE_Y, + 'Positive Y face of cubemap\n' + ){{endif}} {{if 'CU_CUBEMAP_FACE_NEGATIVE_Y' in found_values}} - #: Negative Y face of cubemap - CU_CUBEMAP_FACE_NEGATIVE_Y = cydriver.CUarray_cubemap_face_enum.CU_CUBEMAP_FACE_NEGATIVE_Y{{endif}} + CU_CUBEMAP_FACE_NEGATIVE_Y = ( + cydriver.CUarray_cubemap_face_enum.CU_CUBEMAP_FACE_NEGATIVE_Y, + 'Negative Y face of cubemap\n' + ){{endif}} {{if 'CU_CUBEMAP_FACE_POSITIVE_Z' in found_values}} - #: Positive Z face of cubemap - CU_CUBEMAP_FACE_POSITIVE_Z = cydriver.CUarray_cubemap_face_enum.CU_CUBEMAP_FACE_POSITIVE_Z{{endif}} + CU_CUBEMAP_FACE_POSITIVE_Z = ( + cydriver.CUarray_cubemap_face_enum.CU_CUBEMAP_FACE_POSITIVE_Z, + 'Positive Z face of cubemap\n' + ){{endif}} {{if 'CU_CUBEMAP_FACE_NEGATIVE_Z' in found_values}} - #: Negative Z face of cubemap - CU_CUBEMAP_FACE_NEGATIVE_Z = cydriver.CUarray_cubemap_face_enum.CU_CUBEMAP_FACE_NEGATIVE_Z{{endif}} + CU_CUBEMAP_FACE_NEGATIVE_Z = ( + cydriver.CUarray_cubemap_face_enum.CU_CUBEMAP_FACE_NEGATIVE_Z, + 'Negative Z face of cubemap\n' + ){{endif}} -_dict_CUarray_cubemap_face = dict(((int(v), v) for k, v in CUarray_cubemap_face.__members__.items())) {{endif}} {{if 'CUlimit_enum' in found_types}} -class CUlimit(IntEnum): +class CUlimit(_FastEnum): """ Limits """ {{if 'CU_LIMIT_STACK_SIZE' in found_values}} - #: GPU thread stack size - CU_LIMIT_STACK_SIZE = cydriver.CUlimit_enum.CU_LIMIT_STACK_SIZE{{endif}} + CU_LIMIT_STACK_SIZE = ( + cydriver.CUlimit_enum.CU_LIMIT_STACK_SIZE, + 'GPU thread stack size\n' + ){{endif}} {{if 'CU_LIMIT_PRINTF_FIFO_SIZE' in found_values}} - #: GPU printf FIFO size - CU_LIMIT_PRINTF_FIFO_SIZE = cydriver.CUlimit_enum.CU_LIMIT_PRINTF_FIFO_SIZE{{endif}} + CU_LIMIT_PRINTF_FIFO_SIZE = ( + cydriver.CUlimit_enum.CU_LIMIT_PRINTF_FIFO_SIZE, + 'GPU printf FIFO size\n' + ){{endif}} {{if 'CU_LIMIT_MALLOC_HEAP_SIZE' in found_values}} - #: GPU malloc heap size - CU_LIMIT_MALLOC_HEAP_SIZE = cydriver.CUlimit_enum.CU_LIMIT_MALLOC_HEAP_SIZE{{endif}} + CU_LIMIT_MALLOC_HEAP_SIZE = ( + cydriver.CUlimit_enum.CU_LIMIT_MALLOC_HEAP_SIZE, + 'GPU malloc heap size\n' + ){{endif}} {{if 'CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH' in found_values}} - #: GPU device runtime launch synchronize depth - CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH = cydriver.CUlimit_enum.CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH{{endif}} + CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH = ( + cydriver.CUlimit_enum.CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH, + 'GPU device runtime launch synchronize depth\n' + ){{endif}} {{if 'CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT' in found_values}} - #: GPU device runtime pending launch count - CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT = cydriver.CUlimit_enum.CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT{{endif}} + CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT = ( + cydriver.CUlimit_enum.CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT, + 'GPU device runtime pending launch count\n' + ){{endif}} {{if 'CU_LIMIT_MAX_L2_FETCH_GRANULARITY' in found_values}} - #: A value between 0 and 128 that indicates the maximum fetch - #: granularity of L2 (in Bytes). This is a hint - CU_LIMIT_MAX_L2_FETCH_GRANULARITY = cydriver.CUlimit_enum.CU_LIMIT_MAX_L2_FETCH_GRANULARITY{{endif}} + CU_LIMIT_MAX_L2_FETCH_GRANULARITY = ( + cydriver.CUlimit_enum.CU_LIMIT_MAX_L2_FETCH_GRANULARITY, + 'A value between 0 and 128 that indicates the maximum fetch granularity of\n' + 'L2 (in Bytes). This is a hint\n' + ){{endif}} {{if 'CU_LIMIT_PERSISTING_L2_CACHE_SIZE' in found_values}} - #: A size in bytes for L2 persisting lines cache size - CU_LIMIT_PERSISTING_L2_CACHE_SIZE = cydriver.CUlimit_enum.CU_LIMIT_PERSISTING_L2_CACHE_SIZE{{endif}} + CU_LIMIT_PERSISTING_L2_CACHE_SIZE = ( + cydriver.CUlimit_enum.CU_LIMIT_PERSISTING_L2_CACHE_SIZE, + 'A size in bytes for L2 persisting lines cache size\n' + ){{endif}} {{if 'CU_LIMIT_SHMEM_SIZE' in found_values}} - #: A maximum size in bytes of shared memory available to CUDA kernels - #: on a CIG context. Can only be queried, cannot be set - CU_LIMIT_SHMEM_SIZE = cydriver.CUlimit_enum.CU_LIMIT_SHMEM_SIZE{{endif}} + CU_LIMIT_SHMEM_SIZE = ( + cydriver.CUlimit_enum.CU_LIMIT_SHMEM_SIZE, + 'A maximum size in bytes of shared memory available to CUDA kernels on a CIG\n' + 'context. Can only be queried, cannot be set\n' + ){{endif}} {{if 'CU_LIMIT_CIG_ENABLED' in found_values}} - #: A non-zero value indicates this CUDA context is a CIG-enabled - #: context. Can only be queried, cannot be set - CU_LIMIT_CIG_ENABLED = cydriver.CUlimit_enum.CU_LIMIT_CIG_ENABLED{{endif}} + CU_LIMIT_CIG_ENABLED = ( + cydriver.CUlimit_enum.CU_LIMIT_CIG_ENABLED, + 'A non-zero value indicates this CUDA context is a CIG-enabled context. Can\n' + 'only be queried, cannot be set\n' + ){{endif}} {{if 'CU_LIMIT_CIG_SHMEM_FALLBACK_ENABLED' in found_values}} - #: When set to zero, CUDA will fail to launch a kernel on a CIG - #: context, instead of using the fallback path, if the kernel uses more - #: shared memory than available - CU_LIMIT_CIG_SHMEM_FALLBACK_ENABLED = cydriver.CUlimit_enum.CU_LIMIT_CIG_SHMEM_FALLBACK_ENABLED{{endif}} + CU_LIMIT_CIG_SHMEM_FALLBACK_ENABLED = ( + cydriver.CUlimit_enum.CU_LIMIT_CIG_SHMEM_FALLBACK_ENABLED, + 'When set to zero, CUDA will fail to launch a kernel on a CIG context,\n' + 'instead of using the fallback path, if the kernel uses more shared memory\n' + 'than available\n' + ){{endif}} {{if 'CU_LIMIT_MAX' in found_values}} CU_LIMIT_MAX = cydriver.CUlimit_enum.CU_LIMIT_MAX{{endif}} -_dict_CUlimit = dict(((int(v), v) for k, v in CUlimit.__members__.items())) {{endif}} {{if 'CUresourcetype_enum' in found_types}} -class CUresourcetype(IntEnum): +class CUresourcetype(_FastEnum): """ Resource types """ {{if 'CU_RESOURCE_TYPE_ARRAY' in found_values}} - #: Array resource - CU_RESOURCE_TYPE_ARRAY = cydriver.CUresourcetype_enum.CU_RESOURCE_TYPE_ARRAY{{endif}} + CU_RESOURCE_TYPE_ARRAY = ( + cydriver.CUresourcetype_enum.CU_RESOURCE_TYPE_ARRAY, + 'Array resource\n' + ){{endif}} {{if 'CU_RESOURCE_TYPE_MIPMAPPED_ARRAY' in found_values}} - #: Mipmapped array resource - CU_RESOURCE_TYPE_MIPMAPPED_ARRAY = cydriver.CUresourcetype_enum.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY{{endif}} + CU_RESOURCE_TYPE_MIPMAPPED_ARRAY = ( + cydriver.CUresourcetype_enum.CU_RESOURCE_TYPE_MIPMAPPED_ARRAY, + 'Mipmapped array resource\n' + ){{endif}} {{if 'CU_RESOURCE_TYPE_LINEAR' in found_values}} - #: Linear resource - CU_RESOURCE_TYPE_LINEAR = cydriver.CUresourcetype_enum.CU_RESOURCE_TYPE_LINEAR{{endif}} + CU_RESOURCE_TYPE_LINEAR = ( + cydriver.CUresourcetype_enum.CU_RESOURCE_TYPE_LINEAR, + 'Linear resource\n' + ){{endif}} {{if 'CU_RESOURCE_TYPE_PITCH2D' in found_values}} - #: Pitch 2D resource - CU_RESOURCE_TYPE_PITCH2D = cydriver.CUresourcetype_enum.CU_RESOURCE_TYPE_PITCH2D{{endif}} + CU_RESOURCE_TYPE_PITCH2D = ( + cydriver.CUresourcetype_enum.CU_RESOURCE_TYPE_PITCH2D, + 'Pitch 2D resource\n' + ){{endif}} -_dict_CUresourcetype = dict(((int(v), v) for k, v in CUresourcetype.__members__.items())) {{endif}} {{if 'CUaccessProperty_enum' in found_types}} -class CUaccessProperty(IntEnum): +class CUaccessProperty(_FastEnum): """ Specifies performance hint with :py:obj:`~.CUaccessPolicyWindow` for hitProp and missProp members. """ {{if 'CU_ACCESS_PROPERTY_NORMAL' in found_values}} - #: Normal cache persistence. - CU_ACCESS_PROPERTY_NORMAL = cydriver.CUaccessProperty_enum.CU_ACCESS_PROPERTY_NORMAL{{endif}} + CU_ACCESS_PROPERTY_NORMAL = ( + cydriver.CUaccessProperty_enum.CU_ACCESS_PROPERTY_NORMAL, + 'Normal cache persistence.\n' + ){{endif}} {{if 'CU_ACCESS_PROPERTY_STREAMING' in found_values}} - #: Streaming access is less likely to persit from cache. - CU_ACCESS_PROPERTY_STREAMING = cydriver.CUaccessProperty_enum.CU_ACCESS_PROPERTY_STREAMING{{endif}} + CU_ACCESS_PROPERTY_STREAMING = ( + cydriver.CUaccessProperty_enum.CU_ACCESS_PROPERTY_STREAMING, + 'Streaming access is less likely to persit from cache.\n' + ){{endif}} {{if 'CU_ACCESS_PROPERTY_PERSISTING' in found_values}} - #: Persisting access is more likely to persist in cache. - CU_ACCESS_PROPERTY_PERSISTING = cydriver.CUaccessProperty_enum.CU_ACCESS_PROPERTY_PERSISTING{{endif}} + CU_ACCESS_PROPERTY_PERSISTING = ( + cydriver.CUaccessProperty_enum.CU_ACCESS_PROPERTY_PERSISTING, + 'Persisting access is more likely to persist in cache.\n' + ){{endif}} -_dict_CUaccessProperty = dict(((int(v), v) for k, v in CUaccessProperty.__members__.items())) {{endif}} {{if 'CUgraphConditionalNodeType_enum' in found_types}} -class CUgraphConditionalNodeType(IntEnum): +class CUgraphConditionalNodeType(_FastEnum): """ Conditional node types """ {{if 'CU_GRAPH_COND_TYPE_IF' in found_values}} - #: Conditional 'if/else' Node. Body[0] executed if condition is non- - #: zero. If `size` == 2, an optional ELSE graph is created and this is - #: executed if the condition is zero. - CU_GRAPH_COND_TYPE_IF = cydriver.CUgraphConditionalNodeType_enum.CU_GRAPH_COND_TYPE_IF{{endif}} + CU_GRAPH_COND_TYPE_IF = ( + cydriver.CUgraphConditionalNodeType_enum.CU_GRAPH_COND_TYPE_IF, + "Conditional 'if/else' Node. Body[0] executed if condition is non-zero. If\n" + '`size` == 2, an optional ELSE graph is created and this is executed if the\n' + 'condition is zero.\n' + ){{endif}} {{if 'CU_GRAPH_COND_TYPE_WHILE' in found_values}} - #: Conditional 'while' Node. Body executed repeatedly while condition - #: value is non-zero. - CU_GRAPH_COND_TYPE_WHILE = cydriver.CUgraphConditionalNodeType_enum.CU_GRAPH_COND_TYPE_WHILE{{endif}} + CU_GRAPH_COND_TYPE_WHILE = ( + cydriver.CUgraphConditionalNodeType_enum.CU_GRAPH_COND_TYPE_WHILE, + "Conditional 'while' Node. Body executed repeatedly while condition value is\n" + 'non-zero.\n' + ){{endif}} {{if 'CU_GRAPH_COND_TYPE_SWITCH' in found_values}} - #: Conditional 'switch' Node. Body[n] is executed once, where 'n' is - #: the value of the condition. If the condition does not match a body - #: index, no body is launched. - CU_GRAPH_COND_TYPE_SWITCH = cydriver.CUgraphConditionalNodeType_enum.CU_GRAPH_COND_TYPE_SWITCH{{endif}} + CU_GRAPH_COND_TYPE_SWITCH = ( + cydriver.CUgraphConditionalNodeType_enum.CU_GRAPH_COND_TYPE_SWITCH, + "Conditional 'switch' Node. Body[n] is executed once, where 'n' is the value\n" + 'of the condition. If the condition does not match a body index, no body is\n' + 'launched.\n' + ){{endif}} -_dict_CUgraphConditionalNodeType = dict(((int(v), v) for k, v in CUgraphConditionalNodeType.__members__.items())) {{endif}} {{if 'CUgraphNodeType_enum' in found_types}} -class CUgraphNodeType(IntEnum): +class CUgraphNodeType(_FastEnum): """ Graph node types """ {{if 'CU_GRAPH_NODE_TYPE_KERNEL' in found_values}} - #: GPU kernel node - CU_GRAPH_NODE_TYPE_KERNEL = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_KERNEL{{endif}} + CU_GRAPH_NODE_TYPE_KERNEL = ( + cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_KERNEL, + 'GPU kernel node\n' + ){{endif}} {{if 'CU_GRAPH_NODE_TYPE_MEMCPY' in found_values}} - #: Memcpy node - CU_GRAPH_NODE_TYPE_MEMCPY = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_MEMCPY{{endif}} + CU_GRAPH_NODE_TYPE_MEMCPY = ( + cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_MEMCPY, + 'Memcpy node\n' + ){{endif}} {{if 'CU_GRAPH_NODE_TYPE_MEMSET' in found_values}} - #: Memset node - CU_GRAPH_NODE_TYPE_MEMSET = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_MEMSET{{endif}} + CU_GRAPH_NODE_TYPE_MEMSET = ( + cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_MEMSET, + 'Memset node\n' + ){{endif}} {{if 'CU_GRAPH_NODE_TYPE_HOST' in found_values}} - #: Host (executable) node - CU_GRAPH_NODE_TYPE_HOST = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_HOST{{endif}} + CU_GRAPH_NODE_TYPE_HOST = ( + cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_HOST, + 'Host (executable) node\n' + ){{endif}} {{if 'CU_GRAPH_NODE_TYPE_GRAPH' in found_values}} - #: Node which executes an embedded graph - CU_GRAPH_NODE_TYPE_GRAPH = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_GRAPH{{endif}} + CU_GRAPH_NODE_TYPE_GRAPH = ( + cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_GRAPH, + 'Node which executes an embedded graph\n' + ){{endif}} {{if 'CU_GRAPH_NODE_TYPE_EMPTY' in found_values}} - #: Empty (no-op) node - CU_GRAPH_NODE_TYPE_EMPTY = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_EMPTY{{endif}} + CU_GRAPH_NODE_TYPE_EMPTY = ( + cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_EMPTY, + 'Empty (no-op) node\n' + ){{endif}} {{if 'CU_GRAPH_NODE_TYPE_WAIT_EVENT' in found_values}} - #: External event wait node - CU_GRAPH_NODE_TYPE_WAIT_EVENT = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_WAIT_EVENT{{endif}} + CU_GRAPH_NODE_TYPE_WAIT_EVENT = ( + cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_WAIT_EVENT, + 'External event wait node\n' + ){{endif}} {{if 'CU_GRAPH_NODE_TYPE_EVENT_RECORD' in found_values}} - #: External event record node - CU_GRAPH_NODE_TYPE_EVENT_RECORD = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_EVENT_RECORD{{endif}} + CU_GRAPH_NODE_TYPE_EVENT_RECORD = ( + cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_EVENT_RECORD, + 'External event record node\n' + ){{endif}} {{if 'CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL' in found_values}} - #: External semaphore signal node - CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL{{endif}} + CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL = ( + cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL, + 'External semaphore signal node\n' + ){{endif}} {{if 'CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT' in found_values}} - #: External semaphore wait node - CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT{{endif}} + CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT = ( + cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT, + 'External semaphore wait node\n' + ){{endif}} {{if 'CU_GRAPH_NODE_TYPE_MEM_ALLOC' in found_values}} - #: Memory Allocation Node - CU_GRAPH_NODE_TYPE_MEM_ALLOC = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_MEM_ALLOC{{endif}} + CU_GRAPH_NODE_TYPE_MEM_ALLOC = ( + cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_MEM_ALLOC, + 'Memory Allocation Node\n' + ){{endif}} {{if 'CU_GRAPH_NODE_TYPE_MEM_FREE' in found_values}} - #: Memory Free Node - CU_GRAPH_NODE_TYPE_MEM_FREE = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_MEM_FREE{{endif}} + CU_GRAPH_NODE_TYPE_MEM_FREE = ( + cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_MEM_FREE, + 'Memory Free Node\n' + ){{endif}} {{if 'CU_GRAPH_NODE_TYPE_BATCH_MEM_OP' in found_values}} - #: Batch MemOp Node See :py:obj:`~.cuStreamBatchMemOp` and - #: :py:obj:`~.CUstreamBatchMemOpType` for what these nodes can do. - CU_GRAPH_NODE_TYPE_BATCH_MEM_OP = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_BATCH_MEM_OP{{endif}} + CU_GRAPH_NODE_TYPE_BATCH_MEM_OP = ( + cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_BATCH_MEM_OP, + 'Batch MemOp Node See :py:obj:`~.cuStreamBatchMemOp` and\n' + ':py:obj:`~.CUstreamBatchMemOpType` for what these nodes can do.\n' + ){{endif}} {{if 'CU_GRAPH_NODE_TYPE_CONDITIONAL' in found_values}} - #: Conditional Node May be used - #: to implement a conditional execution path or loop - #: inside of a graph. The - #: graph(s) contained within the body of the conditional node - #: can be selectively executed - #: or iterated upon based on the value of a conditional - #: variable. - #: - #: Handles must be created in - #: advance of creating the node - #: using - #: :py:obj:`~.cuGraphConditionalHandleCreate`. - #: - #: The following restrictions - #: apply to graphs which contain conditional nodes: - #: The graph cannot be used in - #: a child node. - #: Only one instantiation of - #: the graph may exist at any point in time. - #: The graph cannot be cloned. - #: - #: To set the control value, - #: supply a default value when creating the handle and/or - #: call - #: :py:obj:`~.cudaGraphSetConditional` from device code. - CU_GRAPH_NODE_TYPE_CONDITIONAL = cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_CONDITIONAL{{endif}} - -_dict_CUgraphNodeType = dict(((int(v), v) for k, v in CUgraphNodeType.__members__.items())) + CU_GRAPH_NODE_TYPE_CONDITIONAL = ( + cydriver.CUgraphNodeType_enum.CU_GRAPH_NODE_TYPE_CONDITIONAL, + 'Conditional Node May be used to\n' + 'implement a conditional execution path or loop\n' + ' inside of a graph. The graph(s)\n' + 'contained within the body of the conditional node\n' + ' can be selectively executed or\n' + 'iterated upon based on the value of a conditional\n' + ' variable.\n' + ' Handles must be created in advance\n' + 'of creating the node\n' + ' using\n' + ':py:obj:`~.cuGraphConditionalHandleCreate`.\n' + ' The following restrictions apply to\n' + 'graphs which contain conditional nodes:\n' + ' The graph cannot be used in a\n' + 'child node.\n' + ' Only one instantiation of the\n' + 'graph may exist at any point in time.\n' + ' The graph cannot be cloned.\n' + ' To set the control value, supply a\n' + 'default value when creating the handle and/or\n' + ' call\n' + ':py:obj:`~.cudaGraphSetConditional` from device code.\n' + ){{endif}} + {{endif}} {{if 'CUgraphDependencyType_enum' in found_types}} -class CUgraphDependencyType(IntEnum): +class CUgraphDependencyType(_FastEnum): """ Type annotations that can be applied to graph edges as part of :py:obj:`~.CUgraphEdgeData`. """ {{if 'CU_GRAPH_DEPENDENCY_TYPE_DEFAULT' in found_values}} - #: This is an ordinary dependency. - CU_GRAPH_DEPENDENCY_TYPE_DEFAULT = cydriver.CUgraphDependencyType_enum.CU_GRAPH_DEPENDENCY_TYPE_DEFAULT{{endif}} + CU_GRAPH_DEPENDENCY_TYPE_DEFAULT = ( + cydriver.CUgraphDependencyType_enum.CU_GRAPH_DEPENDENCY_TYPE_DEFAULT, + 'This is an ordinary dependency.\n' + ){{endif}} {{if 'CU_GRAPH_DEPENDENCY_TYPE_PROGRAMMATIC' in found_values}} - #: This dependency type allows the downstream node to use - #: `cudaGridDependencySynchronize()`. It may only be used between - #: kernel nodes, and must be used with either the - #: :py:obj:`~.CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC` or - #: :py:obj:`~.CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER` outgoing port. - CU_GRAPH_DEPENDENCY_TYPE_PROGRAMMATIC = cydriver.CUgraphDependencyType_enum.CU_GRAPH_DEPENDENCY_TYPE_PROGRAMMATIC{{endif}} + CU_GRAPH_DEPENDENCY_TYPE_PROGRAMMATIC = ( + cydriver.CUgraphDependencyType_enum.CU_GRAPH_DEPENDENCY_TYPE_PROGRAMMATIC, + 'This dependency type allows the downstream node to use\n' + '`cudaGridDependencySynchronize()`. It may only be used between kernel\n' + 'nodes, and must be used with either the\n' + ':py:obj:`~.CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC` or\n' + ':py:obj:`~.CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER` outgoing port.\n' + ){{endif}} -_dict_CUgraphDependencyType = dict(((int(v), v) for k, v in CUgraphDependencyType.__members__.items())) {{endif}} {{if 'CUgraphInstantiateResult_enum' in found_types}} -class CUgraphInstantiateResult(IntEnum): +class CUgraphInstantiateResult(_FastEnum): """ Graph instantiation results """ {{if 'CUDA_GRAPH_INSTANTIATE_SUCCESS' in found_values}} - #: Instantiation succeeded - CUDA_GRAPH_INSTANTIATE_SUCCESS = cydriver.CUgraphInstantiateResult_enum.CUDA_GRAPH_INSTANTIATE_SUCCESS{{endif}} + CUDA_GRAPH_INSTANTIATE_SUCCESS = ( + cydriver.CUgraphInstantiateResult_enum.CUDA_GRAPH_INSTANTIATE_SUCCESS, + 'Instantiation succeeded\n' + ){{endif}} {{if 'CUDA_GRAPH_INSTANTIATE_ERROR' in found_values}} - #: Instantiation failed for an unexpected reason which is described in - #: the return value of the function - CUDA_GRAPH_INSTANTIATE_ERROR = cydriver.CUgraphInstantiateResult_enum.CUDA_GRAPH_INSTANTIATE_ERROR{{endif}} + CUDA_GRAPH_INSTANTIATE_ERROR = ( + cydriver.CUgraphInstantiateResult_enum.CUDA_GRAPH_INSTANTIATE_ERROR, + 'Instantiation failed for an unexpected reason which is described in the\n' + 'return value of the function\n' + ){{endif}} {{if 'CUDA_GRAPH_INSTANTIATE_INVALID_STRUCTURE' in found_values}} - #: Instantiation failed due to invalid structure, such as cycles - CUDA_GRAPH_INSTANTIATE_INVALID_STRUCTURE = cydriver.CUgraphInstantiateResult_enum.CUDA_GRAPH_INSTANTIATE_INVALID_STRUCTURE{{endif}} + CUDA_GRAPH_INSTANTIATE_INVALID_STRUCTURE = ( + cydriver.CUgraphInstantiateResult_enum.CUDA_GRAPH_INSTANTIATE_INVALID_STRUCTURE, + 'Instantiation failed due to invalid structure, such as cycles\n' + ){{endif}} {{if 'CUDA_GRAPH_INSTANTIATE_NODE_OPERATION_NOT_SUPPORTED' in found_values}} - #: Instantiation for device launch failed because the graph contained - #: an unsupported operation - CUDA_GRAPH_INSTANTIATE_NODE_OPERATION_NOT_SUPPORTED = cydriver.CUgraphInstantiateResult_enum.CUDA_GRAPH_INSTANTIATE_NODE_OPERATION_NOT_SUPPORTED{{endif}} + CUDA_GRAPH_INSTANTIATE_NODE_OPERATION_NOT_SUPPORTED = ( + cydriver.CUgraphInstantiateResult_enum.CUDA_GRAPH_INSTANTIATE_NODE_OPERATION_NOT_SUPPORTED, + 'Instantiation for device launch failed because the graph contained an\n' + 'unsupported operation\n' + ){{endif}} {{if 'CUDA_GRAPH_INSTANTIATE_MULTIPLE_CTXS_NOT_SUPPORTED' in found_values}} - #: Instantiation for device launch failed due to the nodes belonging to - #: different contexts - CUDA_GRAPH_INSTANTIATE_MULTIPLE_CTXS_NOT_SUPPORTED = cydriver.CUgraphInstantiateResult_enum.CUDA_GRAPH_INSTANTIATE_MULTIPLE_CTXS_NOT_SUPPORTED{{endif}} + CUDA_GRAPH_INSTANTIATE_MULTIPLE_CTXS_NOT_SUPPORTED = ( + cydriver.CUgraphInstantiateResult_enum.CUDA_GRAPH_INSTANTIATE_MULTIPLE_CTXS_NOT_SUPPORTED, + 'Instantiation for device launch failed due to the nodes belonging to\n' + 'different contexts\n' + ){{endif}} {{if 'CUDA_GRAPH_INSTANTIATE_CONDITIONAL_HANDLE_UNUSED' in found_values}} - #: One or more conditional handles are not associated with conditional - #: nodes - CUDA_GRAPH_INSTANTIATE_CONDITIONAL_HANDLE_UNUSED = cydriver.CUgraphInstantiateResult_enum.CUDA_GRAPH_INSTANTIATE_CONDITIONAL_HANDLE_UNUSED{{endif}} + CUDA_GRAPH_INSTANTIATE_CONDITIONAL_HANDLE_UNUSED = ( + cydriver.CUgraphInstantiateResult_enum.CUDA_GRAPH_INSTANTIATE_CONDITIONAL_HANDLE_UNUSED, + 'One or more conditional handles are not associated with conditional nodes\n' + ){{endif}} -_dict_CUgraphInstantiateResult = dict(((int(v), v) for k, v in CUgraphInstantiateResult.__members__.items())) {{endif}} {{if 'CUsynchronizationPolicy_enum' in found_types}} -class CUsynchronizationPolicy(IntEnum): +class CUsynchronizationPolicy(_FastEnum): """ """ @@ -3198,34 +4033,37 @@ class CUsynchronizationPolicy(IntEnum): {{if 'CU_SYNC_POLICY_BLOCKING_SYNC' in found_values}} CU_SYNC_POLICY_BLOCKING_SYNC = cydriver.CUsynchronizationPolicy_enum.CU_SYNC_POLICY_BLOCKING_SYNC{{endif}} -_dict_CUsynchronizationPolicy = dict(((int(v), v) for k, v in CUsynchronizationPolicy.__members__.items())) {{endif}} {{if 'CUclusterSchedulingPolicy_enum' in found_types}} -class CUclusterSchedulingPolicy(IntEnum): +class CUclusterSchedulingPolicy(_FastEnum): """ Cluster scheduling policies. These may be passed to :py:obj:`~.cuFuncSetAttribute` or :py:obj:`~.cuKernelSetAttribute` """ {{if 'CU_CLUSTER_SCHEDULING_POLICY_DEFAULT' in found_values}} - #: the default policy - CU_CLUSTER_SCHEDULING_POLICY_DEFAULT = cydriver.CUclusterSchedulingPolicy_enum.CU_CLUSTER_SCHEDULING_POLICY_DEFAULT{{endif}} + CU_CLUSTER_SCHEDULING_POLICY_DEFAULT = ( + cydriver.CUclusterSchedulingPolicy_enum.CU_CLUSTER_SCHEDULING_POLICY_DEFAULT, + 'the default policy\n' + ){{endif}} {{if 'CU_CLUSTER_SCHEDULING_POLICY_SPREAD' in found_values}} - #: spread the blocks within a cluster to the SMs - CU_CLUSTER_SCHEDULING_POLICY_SPREAD = cydriver.CUclusterSchedulingPolicy_enum.CU_CLUSTER_SCHEDULING_POLICY_SPREAD{{endif}} + CU_CLUSTER_SCHEDULING_POLICY_SPREAD = ( + cydriver.CUclusterSchedulingPolicy_enum.CU_CLUSTER_SCHEDULING_POLICY_SPREAD, + 'spread the blocks within a cluster to the SMs\n' + ){{endif}} {{if 'CU_CLUSTER_SCHEDULING_POLICY_LOAD_BALANCING' in found_values}} - #: allow the hardware to load-balance the blocks in a cluster to the - #: SMs - CU_CLUSTER_SCHEDULING_POLICY_LOAD_BALANCING = cydriver.CUclusterSchedulingPolicy_enum.CU_CLUSTER_SCHEDULING_POLICY_LOAD_BALANCING{{endif}} + CU_CLUSTER_SCHEDULING_POLICY_LOAD_BALANCING = ( + cydriver.CUclusterSchedulingPolicy_enum.CU_CLUSTER_SCHEDULING_POLICY_LOAD_BALANCING, + 'allow the hardware to load-balance the blocks in a cluster to the SMs\n' + ){{endif}} -_dict_CUclusterSchedulingPolicy = dict(((int(v), v) for k, v in CUclusterSchedulingPolicy.__members__.items())) {{endif}} {{if 'CUlaunchMemSyncDomain_enum' in found_types}} -class CUlaunchMemSyncDomain(IntEnum): +class CUlaunchMemSyncDomain(_FastEnum): """ Memory Synchronization Domain A kernel can be launched in a specified memory synchronization domain that affects all memory @@ -3248,256 +4086,281 @@ class CUlaunchMemSyncDomain(IntEnum): """ {{if 'CU_LAUNCH_MEM_SYNC_DOMAIN_DEFAULT' in found_values}} - #: Launch kernels in the default domain - CU_LAUNCH_MEM_SYNC_DOMAIN_DEFAULT = cydriver.CUlaunchMemSyncDomain_enum.CU_LAUNCH_MEM_SYNC_DOMAIN_DEFAULT{{endif}} + CU_LAUNCH_MEM_SYNC_DOMAIN_DEFAULT = ( + cydriver.CUlaunchMemSyncDomain_enum.CU_LAUNCH_MEM_SYNC_DOMAIN_DEFAULT, + 'Launch kernels in the default domain\n' + ){{endif}} {{if 'CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE' in found_values}} - #: Launch kernels in the remote domain - CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE = cydriver.CUlaunchMemSyncDomain_enum.CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE{{endif}} + CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE = ( + cydriver.CUlaunchMemSyncDomain_enum.CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE, + 'Launch kernels in the remote domain\n' + ){{endif}} -_dict_CUlaunchMemSyncDomain = dict(((int(v), v) for k, v in CUlaunchMemSyncDomain.__members__.items())) {{endif}} {{if 'CUlaunchAttributeID_enum' in found_types}} -class CUlaunchAttributeID(IntEnum): +class CUlaunchAttributeID(_FastEnum): """ Launch attributes enum; used as id field of :py:obj:`~.CUlaunchAttribute` """ {{if 'CU_LAUNCH_ATTRIBUTE_IGNORE' in found_values}} - #: Ignored entry, for convenient composition - CU_LAUNCH_ATTRIBUTE_IGNORE = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_IGNORE{{endif}} + CU_LAUNCH_ATTRIBUTE_IGNORE = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_IGNORE, + 'Ignored entry, for convenient composition\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW' in found_values}} - #: Valid for streams, graph nodes, launches. See - #: :py:obj:`~.CUlaunchAttributeValue.accessPolicyWindow`. - CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW{{endif}} + CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW, + 'Valid for streams, graph nodes, launches. See\n' + ':py:obj:`~.CUlaunchAttributeValue.accessPolicyWindow`.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_COOPERATIVE' in found_values}} - #: Valid for graph nodes, launches. See - #: :py:obj:`~.CUlaunchAttributeValue.cooperative`. - CU_LAUNCH_ATTRIBUTE_COOPERATIVE = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_COOPERATIVE{{endif}} + CU_LAUNCH_ATTRIBUTE_COOPERATIVE = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_COOPERATIVE, + 'Valid for graph nodes, launches. See\n' + ':py:obj:`~.CUlaunchAttributeValue.cooperative`.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY' in found_values}} - #: Valid for streams. See - #: :py:obj:`~.CUlaunchAttributeValue.syncPolicy`. - CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY{{endif}} + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY, + 'Valid for streams. See :py:obj:`~.CUlaunchAttributeValue.syncPolicy`.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION' in found_values}} - #: Valid for graph nodes, launches. See - #: :py:obj:`~.CUlaunchAttributeValue.clusterDim`. - CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION{{endif}} + CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION, + 'Valid for graph nodes, launches. See\n' + ':py:obj:`~.CUlaunchAttributeValue.clusterDim`.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE' in found_values}} - #: Valid for graph nodes, launches. See - #: :py:obj:`~.CUlaunchAttributeValue.clusterSchedulingPolicyPreference`. - CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE{{endif}} + CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE, + 'Valid for graph nodes, launches. See\n' + ':py:obj:`~.CUlaunchAttributeValue.clusterSchedulingPolicyPreference`.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION' in found_values}} - #: Valid for launches. Setting - #: :py:obj:`~.CUlaunchAttributeValue.programmaticStreamSerializationAllowed` - #: to non-0 signals that the kernel will use programmatic means to - #: resolve its stream dependency, so that the CUDA runtime should - #: opportunistically allow the grid's execution to overlap with the - #: previous kernel in the stream, if that kernel requests the overlap. - #: The dependent launches can choose to wait on the dependency using - #: the programmatic sync (cudaGridDependencySynchronize() or equivalent - #: PTX instructions). - CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION{{endif}} + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION, + 'Valid for launches. Setting\n' + ':py:obj:`~.CUlaunchAttributeValue.programmaticStreamSerializationAllowed`\n' + 'to non-0 signals that the kernel will use programmatic means to resolve its\n' + 'stream dependency, so that the CUDA runtime should opportunistically allow\n' + "the grid's execution to overlap with the previous kernel in the stream, if\n" + 'that kernel requests the overlap. The dependent launches can choose to wait\n' + 'on the dependency using the programmatic sync\n' + '(cudaGridDependencySynchronize() or equivalent PTX instructions).\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT' in found_values}} - #: Valid for launches. Set - #: :py:obj:`~.CUlaunchAttributeValue.programmaticEvent` to record the - #: event. Event recorded through this launch attribute is guaranteed to - #: only trigger after all block in the associated kernel trigger the - #: event. A block can trigger the event through PTX launchdep.release - #: or CUDA builtin function cudaTriggerProgrammaticLaunchCompletion(). - #: A trigger can also be inserted at the beginning of each block's - #: execution if triggerAtBlockStart is set to non-0. The dependent - #: launches can choose to wait on the dependency using the programmatic - #: sync (cudaGridDependencySynchronize() or equivalent PTX - #: instructions). Note that dependents (including the CPU thread - #: calling :py:obj:`~.cuEventSynchronize()`) are not guaranteed to - #: observe the release precisely when it is released. For example, - #: :py:obj:`~.cuEventSynchronize()` may only observe the event trigger - #: long after the associated kernel has completed. This recording type - #: is primarily meant for establishing programmatic dependency between - #: device tasks. Note also this type of dependency allows, but does not - #: guarantee, concurrent execution of tasks. - #: The event supplied must not be an interprocess or interop event. - #: The event must disable timing (i.e. must be created with the - #: :py:obj:`~.CU_EVENT_DISABLE_TIMING` flag set). - CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT{{endif}} + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT, + 'Valid for launches. Set\n' + ':py:obj:`~.CUlaunchAttributeValue.programmaticEvent` to record the event.\n' + 'Event recorded through this launch attribute is guaranteed to only trigger\n' + 'after all block in the associated kernel trigger the event. A block can\n' + 'trigger the event through PTX launchdep.release or CUDA builtin function\n' + 'cudaTriggerProgrammaticLaunchCompletion(). A trigger can also be inserted\n' + "at the beginning of each block's execution if triggerAtBlockStart is set to\n" + 'non-0. The dependent launches can choose to wait on the dependency using\n' + 'the programmatic sync (cudaGridDependencySynchronize() or equivalent PTX\n' + 'instructions). Note that dependents (including the CPU thread calling\n' + ':py:obj:`~.cuEventSynchronize()`) are not guaranteed to observe the release\n' + 'precisely when it is released. For example,\n' + ':py:obj:`~.cuEventSynchronize()` may only observe the event trigger long\n' + 'after the associated kernel has completed. This recording type is primarily\n' + 'meant for establishing programmatic dependency between device tasks. Note\n' + 'also this type of dependency allows, but does not guarantee, concurrent\n' + 'execution of tasks.\n' + ' The event supplied must not be an interprocess or interop event. The event\n' + 'must disable timing (i.e. must be created with the\n' + ':py:obj:`~.CU_EVENT_DISABLE_TIMING` flag set).\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_PRIORITY' in found_values}} - #: Valid for streams, graph nodes, launches. See - #: :py:obj:`~.CUlaunchAttributeValue.priority`. - CU_LAUNCH_ATTRIBUTE_PRIORITY = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PRIORITY{{endif}} + CU_LAUNCH_ATTRIBUTE_PRIORITY = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PRIORITY, + 'Valid for streams, graph nodes, launches. See\n' + ':py:obj:`~.CUlaunchAttributeValue.priority`.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP' in found_values}} - #: Valid for streams, graph nodes, launches. See - #: :py:obj:`~.CUlaunchAttributeValue.memSyncDomainMap`. - CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP{{endif}} + CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP, + 'Valid for streams, graph nodes, launches. See\n' + ':py:obj:`~.CUlaunchAttributeValue.memSyncDomainMap`.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN' in found_values}} - #: Valid for streams, graph nodes, launches. See - #: :py:obj:`~.CUlaunchAttributeValue.memSyncDomain`. - CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN{{endif}} + CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN, + 'Valid for streams, graph nodes, launches. See\n' + ':py:obj:`~.CUlaunchAttributeValue.memSyncDomain`.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION' in found_values}} - #: Valid for graph nodes, launches. Set - #: :py:obj:`~.CUlaunchAttributeValue.preferredClusterDim` to allow the - #: kernel launch to specify a preferred substitute cluster dimension. - #: Blocks may be grouped according to either the dimensions specified - #: with this attribute (grouped into a "preferred substitute cluster"), - #: or the one specified with - #: :py:obj:`~.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION` attribute (grouped - #: into a "regular cluster"). The cluster dimensions of a "preferred - #: substitute cluster" shall be an integer multiple greater than zero - #: of the regular cluster dimensions. The device will attempt - on a - #: best-effort basis - to group thread blocks into preferred clusters - #: over grouping them into regular clusters. When it deems necessary - #: (primarily when the device temporarily runs out of physical - #: resources to launch the larger preferred clusters), the device may - #: switch to launch the regular clusters instead to attempt to utilize - #: as much of the physical device resources as possible. - #: Each type of cluster will have its enumeration / coordinate setup - #: as if the grid consists solely of its type of cluster. For example, - #: if the preferred substitute cluster dimensions double the regular - #: cluster dimensions, there might be simultaneously a regular cluster - #: indexed at (1,0,0), and a preferred cluster indexed at (1,0,0). In - #: this example, the preferred substitute cluster (1,0,0) replaces - #: regular clusters (2,0,0) and (3,0,0) and groups their blocks. - #: This attribute will only take effect when a regular cluster - #: dimension has been specified. The preferred substitute cluster - #: dimension must be an integer multiple greater than zero of the - #: regular cluster dimension and must divide the grid. It must also be - #: no more than `maxBlocksPerCluster`, if it is set in the kernel's - #: `__launch_bounds__`. Otherwise it must be less than the maximum - #: value the driver can support. Otherwise, setting this attribute to a - #: value physically unable to fit on any particular device is - #: permitted. - CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION{{endif}} + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION, + 'Valid for graph nodes, launches. Set\n' + ':py:obj:`~.CUlaunchAttributeValue.preferredClusterDim` to allow the kernel\n' + 'launch to specify a preferred substitute cluster dimension. Blocks may be\n' + 'grouped according to either the dimensions specified with this attribute\n' + '(grouped into a "preferred substitute cluster"), or the one specified with\n' + ':py:obj:`~.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION` attribute (grouped into a\n' + '"regular cluster"). The cluster dimensions of a "preferred substitute\n' + 'cluster" shall be an integer multiple greater than zero of the regular\n' + 'cluster dimensions. The device will attempt - on a best-effort basis - to\n' + 'group thread blocks into preferred clusters over grouping them into regular\n' + 'clusters. When it deems necessary (primarily when the device temporarily\n' + 'runs out of physical resources to launch the larger preferred clusters),\n' + 'the device may switch to launch the regular clusters instead to attempt to\n' + 'utilize as much of the physical device resources as possible.\n' + ' Each type of cluster will have its enumeration / coordinate setup as if\n' + 'the grid consists solely of its type of cluster. For example, if the\n' + 'preferred substitute cluster dimensions double the regular cluster\n' + 'dimensions, there might be simultaneously a regular cluster indexed at\n' + '(1,0,0), and a preferred cluster indexed at (1,0,0). In this example, the\n' + 'preferred substitute cluster (1,0,0) replaces regular clusters (2,0,0) and\n' + '(3,0,0) and groups their blocks.\n' + ' This attribute will only take effect when a regular cluster dimension has\n' + 'been specified. The preferred substitute cluster dimension must be an\n' + 'integer multiple greater than zero of the regular cluster dimension and\n' + 'must divide the grid. It must also be no more than `maxBlocksPerCluster`,\n' + "if it is set in the kernel's `__launch_bounds__`. Otherwise it must be less\n" + 'than the maximum value the driver can support. Otherwise, setting this\n' + 'attribute to a value physically unable to fit on any particular device is\n' + 'permitted.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT' in found_values}} - #: Valid for launches. Set - #: :py:obj:`~.CUlaunchAttributeValue.launchCompletionEvent` to record - #: the event. - #: Nominally, the event is triggered once all blocks of the kernel - #: have begun execution. Currently this is a best effort. If a kernel B - #: has a launch completion dependency on a kernel A, B may wait until A - #: is complete. Alternatively, blocks of B may begin before all blocks - #: of A have begun, for example if B can claim execution resources - #: unavailable to A (e.g. they run on different GPUs) or if B is a - #: higher priority than A. Exercise caution if such an ordering - #: inversion could lead to deadlock. - #: A launch completion event is nominally similar to a programmatic - #: event with `triggerAtBlockStart` set except that it is not visible - #: to `cudaGridDependencySynchronize()` and can be used with compute - #: capability less than 9.0. - #: The event supplied must not be an interprocess or interop event. - #: The event must disable timing (i.e. must be created with the - #: :py:obj:`~.CU_EVENT_DISABLE_TIMING` flag set). - CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT{{endif}} + CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT, + 'Valid for launches. Set\n' + ':py:obj:`~.CUlaunchAttributeValue.launchCompletionEvent` to record the\n' + 'event.\n' + ' Nominally, the event is triggered once all blocks of the kernel have begun\n' + 'execution. Currently this is a best effort. If a kernel B has a launch\n' + 'completion dependency on a kernel A, B may wait until A is complete.\n' + 'Alternatively, blocks of B may begin before all blocks of A have begun, for\n' + 'example if B can claim execution resources unavailable to A (e.g. they run\n' + 'on different GPUs) or if B is a higher priority than A. Exercise caution if\n' + 'such an ordering inversion could lead to deadlock.\n' + ' A launch completion event is nominally similar to a programmatic event\n' + 'with `triggerAtBlockStart` set except that it is not visible to\n' + '`cudaGridDependencySynchronize()` and can be used with compute capability\n' + 'less than 9.0.\n' + ' The event supplied must not be an interprocess or interop event. The event\n' + 'must disable timing (i.e. must be created with the\n' + ':py:obj:`~.CU_EVENT_DISABLE_TIMING` flag set).\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE' in found_values}} - #: Valid for graph nodes, launches. This attribute is graphs-only, and - #: passing it to a launch in a non-capturing stream will result in an - #: error. - #: :py:obj:`~.CUlaunchAttributeValue`::deviceUpdatableKernelNode::deviceUpdatable - #: can only be set to 0 or 1. Setting the field to 1 indicates that the - #: corresponding kernel node should be device-updatable. On success, a - #: handle will be returned via - #: :py:obj:`~.CUlaunchAttributeValue`::deviceUpdatableKernelNode::devNode - #: which can be passed to the various device-side update functions to - #: update the node's kernel parameters from within another kernel. For - #: more information on the types of device updates that can be made, as - #: well as the relevant limitations thereof, see - #: :py:obj:`~.cudaGraphKernelNodeUpdatesApply`. - #: Nodes which are device-updatable have additional restrictions - #: compared to regular kernel nodes. Firstly, device-updatable nodes - #: cannot be removed from their graph via - #: :py:obj:`~.cuGraphDestroyNode`. Additionally, once opted-in to this - #: functionality, a node cannot opt out, and any attempt to set the - #: deviceUpdatable attribute to 0 will result in an error. Device- - #: updatable kernel nodes also cannot have their attributes copied - #: to/from another kernel node via - #: :py:obj:`~.cuGraphKernelNodeCopyAttributes`. Graphs containing one - #: or more device-updatable nodes also do not allow multiple - #: instantiation, and neither the graph nor its instantiated version - #: can be passed to :py:obj:`~.cuGraphExecUpdate`. - #: If a graph contains device-updatable nodes and updates those nodes - #: from the device from within the graph, the graph must be uploaded - #: with :py:obj:`~.cuGraphUpload` before it is launched. For such a - #: graph, if host-side executable graph updates are made to the device- - #: updatable nodes, the graph must be uploaded before it is launched - #: again. - CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE{{endif}} + CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE, + 'Valid for graph nodes, launches. This attribute is graphs-only, and passing\n' + 'it to a launch in a non-capturing stream will result in an error.\n' + ':py:obj:`~.CUlaunchAttributeValue`::deviceUpdatableKernelNode::deviceUpdatable\n' + 'can only be set to 0 or 1. Setting the field to 1 indicates that the\n' + 'corresponding kernel node should be device-updatable. On success, a handle\n' + 'will be returned via\n' + ':py:obj:`~.CUlaunchAttributeValue`::deviceUpdatableKernelNode::devNode\n' + 'which can be passed to the various device-side update functions to update\n' + "the node's kernel parameters from within another kernel. For more\n" + 'information on the types of device updates that can be made, as well as the\n' + 'relevant limitations thereof, see\n' + ':py:obj:`~.cudaGraphKernelNodeUpdatesApply`.\n' + ' Nodes which are device-updatable have additional restrictions compared to\n' + 'regular kernel nodes. Firstly, device-updatable nodes cannot be removed\n' + 'from their graph via :py:obj:`~.cuGraphDestroyNode`. Additionally, once\n' + 'opted-in to this functionality, a node cannot opt out, and any attempt to\n' + 'set the deviceUpdatable attribute to 0 will result in an error. Device-\n' + 'updatable kernel nodes also cannot have their attributes copied to/from\n' + 'another kernel node via :py:obj:`~.cuGraphKernelNodeCopyAttributes`. Graphs\n' + 'containing one or more device-updatable nodes also do not allow multiple\n' + 'instantiation, and neither the graph nor its instantiated version can be\n' + 'passed to :py:obj:`~.cuGraphExecUpdate`.\n' + ' If a graph contains device-updatable nodes and updates those nodes from\n' + 'the device from within the graph, the graph must be uploaded with\n' + ':py:obj:`~.cuGraphUpload` before it is launched. For such a graph, if host-\n' + 'side executable graph updates are made to the device-updatable nodes, the\n' + 'graph must be uploaded before it is launched again.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT' in found_values}} - #: Valid for launches. On devices where the L1 cache and shared memory - #: use the same hardware resources, setting - #: :py:obj:`~.CUlaunchAttributeValue.sharedMemCarveout` to a percentage - #: between 0-100 signals the CUDA driver to set the shared memory - #: carveout preference, in percent of the total shared memory for that - #: kernel launch. This attribute takes precedence over - #: :py:obj:`~.CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT`. This - #: is only a hint, and the CUDA driver can choose a different - #: configuration if required for the launch. - CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT{{endif}} + CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT, + 'Valid for launches. On devices where the L1 cache and shared memory use the\n' + 'same hardware resources, setting\n' + ':py:obj:`~.CUlaunchAttributeValue.sharedMemCarveout` to a percentage\n' + 'between 0-100 signals the CUDA driver to set the shared memory carveout\n' + 'preference, in percent of the total shared memory for that kernel launch.\n' + 'This attribute takes precedence over\n' + ':py:obj:`~.CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT`. This is\n' + 'only a hint, and the CUDA driver can choose a different configuration if\n' + 'required for the launch.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_NVLINK_UTIL_CENTRIC_SCHEDULING' in found_values}} - #: Valid for streams, graph nodes, launches. This attribute is a hint - #: to the CUDA runtime that the launch should attempt to make the - #: kernel maximize its NVLINK utilization. - #: - #: When possible to honor this hint, CUDA will assume each block in - #: the grid launch will carry out an even amount of NVLINK traffic, and - #: make a best-effort attempt to adjust the kernel launch based on that - #: assumption. - #: This attribute is a hint only. CUDA makes no functional or - #: performance guarantee. Its applicability can be affected by many - #: different factors, including driver version (i.e. CUDA doesn't - #: guarantee the performance characteristics will be maintained between - #: driver versions or a driver update could alter or regress previously - #: observed perf characteristics.) It also doesn't guarantee a - #: successful result, i.e. applying the attribute may not improve the - #: performance of either the targeted kernel or the encapsulating - #: application. - #: Valid values for - #: :py:obj:`~.CUlaunchAttributeValue`::nvlinkUtilCentricScheduling are - #: 0 (disabled) and 1 (enabled). - CU_LAUNCH_ATTRIBUTE_NVLINK_UTIL_CENTRIC_SCHEDULING = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_NVLINK_UTIL_CENTRIC_SCHEDULING{{endif}} - -_dict_CUlaunchAttributeID = dict(((int(v), v) for k, v in CUlaunchAttributeID.__members__.items())) + CU_LAUNCH_ATTRIBUTE_NVLINK_UTIL_CENTRIC_SCHEDULING = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_NVLINK_UTIL_CENTRIC_SCHEDULING, + 'Valid for streams, graph nodes, launches. This attribute is a hint to the\n' + 'CUDA runtime that the launch should attempt to make the kernel maximize its\n' + 'NVLINK utilization.\n' + ' When possible to honor this hint, CUDA will assume each block in the grid\n' + 'launch will carry out an even amount of NVLINK traffic, and make a best-\n' + 'effort attempt to adjust the kernel launch based on that assumption.\n' + ' This attribute is a hint only. CUDA makes no functional or performance\n' + 'guarantee. Its applicability can be affected by many different factors,\n' + "including driver version (i.e. CUDA doesn't guarantee the performance\n" + 'characteristics will be maintained between driver versions or a driver\n' + 'update could alter or regress previously observed perf characteristics.) It\n' + "also doesn't guarantee a successful result, i.e. applying the attribute may\n" + 'not improve the performance of either the targeted kernel or the\n' + 'encapsulating application.\n' + ' Valid values for\n' + ':py:obj:`~.CUlaunchAttributeValue`::nvlinkUtilCentricScheduling are 0\n' + '(disabled) and 1 (enabled).\n' + ){{endif}} + {{endif}} {{if 'CUstreamCaptureStatus_enum' in found_types}} -class CUstreamCaptureStatus(IntEnum): +class CUstreamCaptureStatus(_FastEnum): """ Possible stream capture statuses returned by :py:obj:`~.cuStreamIsCapturing` """ {{if 'CU_STREAM_CAPTURE_STATUS_NONE' in found_values}} - #: Stream is not capturing - CU_STREAM_CAPTURE_STATUS_NONE = cydriver.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_NONE{{endif}} + CU_STREAM_CAPTURE_STATUS_NONE = ( + cydriver.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_NONE, + 'Stream is not capturing\n' + ){{endif}} {{if 'CU_STREAM_CAPTURE_STATUS_ACTIVE' in found_values}} - #: Stream is actively capturing - CU_STREAM_CAPTURE_STATUS_ACTIVE = cydriver.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_ACTIVE{{endif}} + CU_STREAM_CAPTURE_STATUS_ACTIVE = ( + cydriver.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_ACTIVE, + 'Stream is actively capturing\n' + ){{endif}} {{if 'CU_STREAM_CAPTURE_STATUS_INVALIDATED' in found_values}} - #: Stream is part of a capture sequence that has been invalidated, but - #: not terminated - CU_STREAM_CAPTURE_STATUS_INVALIDATED = cydriver.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_INVALIDATED{{endif}} + CU_STREAM_CAPTURE_STATUS_INVALIDATED = ( + cydriver.CUstreamCaptureStatus_enum.CU_STREAM_CAPTURE_STATUS_INVALIDATED, + 'Stream is part of a capture sequence that has been invalidated, but not\n' + 'terminated\n' + ){{endif}} -_dict_CUstreamCaptureStatus = dict(((int(v), v) for k, v in CUstreamCaptureStatus.__members__.items())) {{endif}} {{if 'CUstreamCaptureMode_enum' in found_types}} -class CUstreamCaptureMode(IntEnum): +class CUstreamCaptureMode(_FastEnum): """ Possible modes for stream capture thread interactions. For more details see :py:obj:`~.cuStreamBeginCapture` and @@ -3510,70 +4373,80 @@ class CUstreamCaptureMode(IntEnum): {{if 'CU_STREAM_CAPTURE_MODE_RELAXED' in found_values}} CU_STREAM_CAPTURE_MODE_RELAXED = cydriver.CUstreamCaptureMode_enum.CU_STREAM_CAPTURE_MODE_RELAXED{{endif}} -_dict_CUstreamCaptureMode = dict(((int(v), v) for k, v in CUstreamCaptureMode.__members__.items())) {{endif}} {{if 'CUdriverProcAddress_flags_enum' in found_types}} -class CUdriverProcAddress_flags(IntEnum): +class CUdriverProcAddress_flags(_FastEnum): """ Flags to specify search options. For more details see :py:obj:`~.cuGetProcAddress` """ {{if 'CU_GET_PROC_ADDRESS_DEFAULT' in found_values}} - #: Default search mode for driver symbols. - CU_GET_PROC_ADDRESS_DEFAULT = cydriver.CUdriverProcAddress_flags_enum.CU_GET_PROC_ADDRESS_DEFAULT{{endif}} + CU_GET_PROC_ADDRESS_DEFAULT = ( + cydriver.CUdriverProcAddress_flags_enum.CU_GET_PROC_ADDRESS_DEFAULT, + 'Default search mode for driver symbols.\n' + ){{endif}} {{if 'CU_GET_PROC_ADDRESS_LEGACY_STREAM' in found_values}} - #: Search for legacy versions of driver symbols. - CU_GET_PROC_ADDRESS_LEGACY_STREAM = cydriver.CUdriverProcAddress_flags_enum.CU_GET_PROC_ADDRESS_LEGACY_STREAM{{endif}} + CU_GET_PROC_ADDRESS_LEGACY_STREAM = ( + cydriver.CUdriverProcAddress_flags_enum.CU_GET_PROC_ADDRESS_LEGACY_STREAM, + 'Search for legacy versions of driver symbols.\n' + ){{endif}} {{if 'CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM' in found_values}} - #: Search for per-thread versions of driver symbols. - CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM = cydriver.CUdriverProcAddress_flags_enum.CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM{{endif}} + CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM = ( + cydriver.CUdriverProcAddress_flags_enum.CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, + 'Search for per-thread versions of driver symbols.\n' + ){{endif}} -_dict_CUdriverProcAddress_flags = dict(((int(v), v) for k, v in CUdriverProcAddress_flags.__members__.items())) {{endif}} {{if 'CUdriverProcAddressQueryResult_enum' in found_types}} -class CUdriverProcAddressQueryResult(IntEnum): +class CUdriverProcAddressQueryResult(_FastEnum): """ Flags to indicate search status. For more details see :py:obj:`~.cuGetProcAddress` """ {{if 'CU_GET_PROC_ADDRESS_SUCCESS' in found_values}} - #: Symbol was succesfully found - CU_GET_PROC_ADDRESS_SUCCESS = cydriver.CUdriverProcAddressQueryResult_enum.CU_GET_PROC_ADDRESS_SUCCESS{{endif}} + CU_GET_PROC_ADDRESS_SUCCESS = ( + cydriver.CUdriverProcAddressQueryResult_enum.CU_GET_PROC_ADDRESS_SUCCESS, + 'Symbol was succesfully found\n' + ){{endif}} {{if 'CU_GET_PROC_ADDRESS_SYMBOL_NOT_FOUND' in found_values}} - #: Symbol was not found in search - CU_GET_PROC_ADDRESS_SYMBOL_NOT_FOUND = cydriver.CUdriverProcAddressQueryResult_enum.CU_GET_PROC_ADDRESS_SYMBOL_NOT_FOUND{{endif}} + CU_GET_PROC_ADDRESS_SYMBOL_NOT_FOUND = ( + cydriver.CUdriverProcAddressQueryResult_enum.CU_GET_PROC_ADDRESS_SYMBOL_NOT_FOUND, + 'Symbol was not found in search\n' + ){{endif}} {{if 'CU_GET_PROC_ADDRESS_VERSION_NOT_SUFFICIENT' in found_values}} - #: Symbol was found but version supplied was not sufficient - CU_GET_PROC_ADDRESS_VERSION_NOT_SUFFICIENT = cydriver.CUdriverProcAddressQueryResult_enum.CU_GET_PROC_ADDRESS_VERSION_NOT_SUFFICIENT{{endif}} + CU_GET_PROC_ADDRESS_VERSION_NOT_SUFFICIENT = ( + cydriver.CUdriverProcAddressQueryResult_enum.CU_GET_PROC_ADDRESS_VERSION_NOT_SUFFICIENT, + 'Symbol was found but version supplied was not sufficient\n' + ){{endif}} -_dict_CUdriverProcAddressQueryResult = dict(((int(v), v) for k, v in CUdriverProcAddressQueryResult.__members__.items())) {{endif}} {{if 'CUexecAffinityType_enum' in found_types}} -class CUexecAffinityType(IntEnum): +class CUexecAffinityType(_FastEnum): """ Execution Affinity Types """ {{if 'CU_EXEC_AFFINITY_TYPE_SM_COUNT' in found_values}} - #: Create a context with limited SMs. - CU_EXEC_AFFINITY_TYPE_SM_COUNT = cydriver.CUexecAffinityType_enum.CU_EXEC_AFFINITY_TYPE_SM_COUNT{{endif}} + CU_EXEC_AFFINITY_TYPE_SM_COUNT = ( + cydriver.CUexecAffinityType_enum.CU_EXEC_AFFINITY_TYPE_SM_COUNT, + 'Create a context with limited SMs.\n' + ){{endif}} {{if 'CU_EXEC_AFFINITY_TYPE_MAX' in found_values}} CU_EXEC_AFFINITY_TYPE_MAX = cydriver.CUexecAffinityType_enum.CU_EXEC_AFFINITY_TYPE_MAX{{endif}} -_dict_CUexecAffinityType = dict(((int(v), v) for k, v in CUexecAffinityType.__members__.items())) {{endif}} {{if 'CUcigDataType_enum' in found_types}} -class CUcigDataType(IntEnum): +class CUcigDataType(_FastEnum): """ """ @@ -3581,14 +4454,15 @@ class CUcigDataType(IntEnum): CIG_DATA_TYPE_D3D12_COMMAND_QUEUE = cydriver.CUcigDataType_enum.CIG_DATA_TYPE_D3D12_COMMAND_QUEUE{{endif}} {{if 'CIG_DATA_TYPE_NV_BLOB' in found_values}} - #: D3D12 Command Queue Handle - CIG_DATA_TYPE_NV_BLOB = cydriver.CUcigDataType_enum.CIG_DATA_TYPE_NV_BLOB{{endif}} + CIG_DATA_TYPE_NV_BLOB = ( + cydriver.CUcigDataType_enum.CIG_DATA_TYPE_NV_BLOB, + 'D3D12 Command Queue Handle\n' + ){{endif}} -_dict_CUcigDataType = dict(((int(v), v) for k, v in CUcigDataType.__members__.items())) {{endif}} {{if 'CUlibraryOption_enum' in found_types}} -class CUlibraryOption(IntEnum): +class CUlibraryOption(_FastEnum): """ Library options to be specified with :py:obj:`~.cuLibraryLoadData()` or @@ -3598,809 +4472,1076 @@ class CUlibraryOption(IntEnum): CU_LIBRARY_HOST_UNIVERSAL_FUNCTION_AND_DATA_TABLE = cydriver.CUlibraryOption_enum.CU_LIBRARY_HOST_UNIVERSAL_FUNCTION_AND_DATA_TABLE{{endif}} {{if 'CU_LIBRARY_BINARY_IS_PRESERVED' in found_values}} - #: Specifes that the argument `code` passed to - #: :py:obj:`~.cuLibraryLoadData()` will be preserved. Specifying this - #: option will let the driver know that `code` can be accessed at any - #: point until :py:obj:`~.cuLibraryUnload()`. The default behavior is - #: for the driver to allocate and maintain its own copy of `code`. Note - #: that this is only a memory usage optimization hint and the driver - #: can choose to ignore it if required. Specifying this option with - #: :py:obj:`~.cuLibraryLoadFromFile()` is invalid and will return - #: :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. - CU_LIBRARY_BINARY_IS_PRESERVED = cydriver.CUlibraryOption_enum.CU_LIBRARY_BINARY_IS_PRESERVED{{endif}} + CU_LIBRARY_BINARY_IS_PRESERVED = ( + cydriver.CUlibraryOption_enum.CU_LIBRARY_BINARY_IS_PRESERVED, + 'Specifes that the argument `code` passed to :py:obj:`~.cuLibraryLoadData()`\n' + 'will be preserved. Specifying this option will let the driver know that\n' + '`code` can be accessed at any point until :py:obj:`~.cuLibraryUnload()`.\n' + 'The default behavior is for the driver to allocate and maintain its own\n' + 'copy of `code`. Note that this is only a memory usage optimization hint and\n' + 'the driver can choose to ignore it if required. Specifying this option with\n' + ':py:obj:`~.cuLibraryLoadFromFile()` is invalid and will return\n' + ':py:obj:`~.CUDA_ERROR_INVALID_VALUE`.\n' + ){{endif}} {{if 'CU_LIBRARY_NUM_OPTIONS' in found_values}} CU_LIBRARY_NUM_OPTIONS = cydriver.CUlibraryOption_enum.CU_LIBRARY_NUM_OPTIONS{{endif}} -_dict_CUlibraryOption = dict(((int(v), v) for k, v in CUlibraryOption.__members__.items())) {{endif}} {{if 'cudaError_enum' in found_types}} -class CUresult(IntEnum): +class CUresult(_FastEnum): """ Error codes """ {{if 'CUDA_SUCCESS' in found_values}} - #: The API call returned with no errors. In the case of query calls, - #: this also means that the operation being queried is complete (see - #: :py:obj:`~.cuEventQuery()` and :py:obj:`~.cuStreamQuery()`). - CUDA_SUCCESS = cydriver.cudaError_enum.CUDA_SUCCESS{{endif}} + CUDA_SUCCESS = ( + cydriver.cudaError_enum.CUDA_SUCCESS, + 'The API call returned with no errors. In the case of query calls, this also\n' + 'means that the operation being queried is complete (see\n' + ':py:obj:`~.cuEventQuery()` and :py:obj:`~.cuStreamQuery()`).\n' + ){{endif}} {{if 'CUDA_ERROR_INVALID_VALUE' in found_values}} - #: This indicates that one or more of the parameters passed to the API - #: call is not within an acceptable range of values. - CUDA_ERROR_INVALID_VALUE = cydriver.cudaError_enum.CUDA_ERROR_INVALID_VALUE{{endif}} + CUDA_ERROR_INVALID_VALUE = ( + cydriver.cudaError_enum.CUDA_ERROR_INVALID_VALUE, + 'This indicates that one or more of the parameters passed to the API call is\n' + 'not within an acceptable range of values.\n' + ){{endif}} {{if 'CUDA_ERROR_OUT_OF_MEMORY' in found_values}} - #: The API call failed because it was unable to allocate enough memory - #: or other resources to perform the requested operation. - CUDA_ERROR_OUT_OF_MEMORY = cydriver.cudaError_enum.CUDA_ERROR_OUT_OF_MEMORY{{endif}} + CUDA_ERROR_OUT_OF_MEMORY = ( + cydriver.cudaError_enum.CUDA_ERROR_OUT_OF_MEMORY, + 'The API call failed because it was unable to allocate enough memory or\n' + 'other resources to perform the requested operation.\n' + ){{endif}} {{if 'CUDA_ERROR_NOT_INITIALIZED' in found_values}} - #: This indicates that the CUDA driver has not been initialized with - #: :py:obj:`~.cuInit()` or that initialization has failed. - CUDA_ERROR_NOT_INITIALIZED = cydriver.cudaError_enum.CUDA_ERROR_NOT_INITIALIZED{{endif}} + CUDA_ERROR_NOT_INITIALIZED = ( + cydriver.cudaError_enum.CUDA_ERROR_NOT_INITIALIZED, + 'This indicates that the CUDA driver has not been initialized with\n' + ':py:obj:`~.cuInit()` or that initialization has failed.\n' + ){{endif}} {{if 'CUDA_ERROR_DEINITIALIZED' in found_values}} - #: This indicates that the CUDA driver is in the process of shutting - #: down. - CUDA_ERROR_DEINITIALIZED = cydriver.cudaError_enum.CUDA_ERROR_DEINITIALIZED{{endif}} + CUDA_ERROR_DEINITIALIZED = ( + cydriver.cudaError_enum.CUDA_ERROR_DEINITIALIZED, + 'This indicates that the CUDA driver is in the process of shutting down.\n' + ){{endif}} {{if 'CUDA_ERROR_PROFILER_DISABLED' in found_values}} - #: This indicates profiler is not initialized for this run. This can - #: happen when the application is running with external profiling tools - #: like visual profiler. - CUDA_ERROR_PROFILER_DISABLED = cydriver.cudaError_enum.CUDA_ERROR_PROFILER_DISABLED{{endif}} + CUDA_ERROR_PROFILER_DISABLED = ( + cydriver.cudaError_enum.CUDA_ERROR_PROFILER_DISABLED, + 'This indicates profiler is not initialized for this run. This can happen\n' + 'when the application is running with external profiling tools like visual\n' + 'profiler.\n' + ){{endif}} {{if 'CUDA_ERROR_PROFILER_NOT_INITIALIZED' in found_values}} - #: [Deprecated] - CUDA_ERROR_PROFILER_NOT_INITIALIZED = cydriver.cudaError_enum.CUDA_ERROR_PROFILER_NOT_INITIALIZED{{endif}} + CUDA_ERROR_PROFILER_NOT_INITIALIZED = ( + cydriver.cudaError_enum.CUDA_ERROR_PROFILER_NOT_INITIALIZED, + '[Deprecated]\n' + ){{endif}} {{if 'CUDA_ERROR_PROFILER_ALREADY_STARTED' in found_values}} - #: [Deprecated] - CUDA_ERROR_PROFILER_ALREADY_STARTED = cydriver.cudaError_enum.CUDA_ERROR_PROFILER_ALREADY_STARTED{{endif}} + CUDA_ERROR_PROFILER_ALREADY_STARTED = ( + cydriver.cudaError_enum.CUDA_ERROR_PROFILER_ALREADY_STARTED, + '[Deprecated]\n' + ){{endif}} {{if 'CUDA_ERROR_PROFILER_ALREADY_STOPPED' in found_values}} - #: [Deprecated] - CUDA_ERROR_PROFILER_ALREADY_STOPPED = cydriver.cudaError_enum.CUDA_ERROR_PROFILER_ALREADY_STOPPED{{endif}} + CUDA_ERROR_PROFILER_ALREADY_STOPPED = ( + cydriver.cudaError_enum.CUDA_ERROR_PROFILER_ALREADY_STOPPED, + '[Deprecated]\n' + ){{endif}} {{if 'CUDA_ERROR_STUB_LIBRARY' in found_values}} - #: This indicates that the CUDA driver that the application has loaded - #: is a stub library. Applications that run with the stub rather than a - #: real driver loaded will result in CUDA API returning this error. - CUDA_ERROR_STUB_LIBRARY = cydriver.cudaError_enum.CUDA_ERROR_STUB_LIBRARY{{endif}} + CUDA_ERROR_STUB_LIBRARY = ( + cydriver.cudaError_enum.CUDA_ERROR_STUB_LIBRARY, + 'This indicates that the CUDA driver that the application has loaded is a\n' + 'stub library. Applications that run with the stub rather than a real driver\n' + 'loaded will result in CUDA API returning this error.\n' + ){{endif}} {{if 'CUDA_ERROR_CALL_REQUIRES_NEWER_DRIVER' in found_values}} - #: This indicates that the API call requires a newer CUDA driver than - #: the one currently installed. Users should install an updated NVIDIA - #: CUDA driver to allow the API call to succeed. - CUDA_ERROR_CALL_REQUIRES_NEWER_DRIVER = cydriver.cudaError_enum.CUDA_ERROR_CALL_REQUIRES_NEWER_DRIVER{{endif}} + CUDA_ERROR_CALL_REQUIRES_NEWER_DRIVER = ( + cydriver.cudaError_enum.CUDA_ERROR_CALL_REQUIRES_NEWER_DRIVER, + 'This indicates that the API call requires a newer CUDA driver than the one\n' + 'currently installed. Users should install an updated NVIDIA CUDA driver to\n' + 'allow the API call to succeed.\n' + ){{endif}} {{if 'CUDA_ERROR_DEVICE_UNAVAILABLE' in found_values}} - #: This indicates that requested CUDA device is unavailable at the - #: current time. Devices are often unavailable due to use of - #: :py:obj:`~.CU_COMPUTEMODE_EXCLUSIVE_PROCESS` or - #: :py:obj:`~.CU_COMPUTEMODE_PROHIBITED`. - CUDA_ERROR_DEVICE_UNAVAILABLE = cydriver.cudaError_enum.CUDA_ERROR_DEVICE_UNAVAILABLE{{endif}} + CUDA_ERROR_DEVICE_UNAVAILABLE = ( + cydriver.cudaError_enum.CUDA_ERROR_DEVICE_UNAVAILABLE, + 'This indicates that requested CUDA device is unavailable at the current\n' + 'time. Devices are often unavailable due to use of\n' + ':py:obj:`~.CU_COMPUTEMODE_EXCLUSIVE_PROCESS` or\n' + ':py:obj:`~.CU_COMPUTEMODE_PROHIBITED`.\n' + ){{endif}} {{if 'CUDA_ERROR_NO_DEVICE' in found_values}} - #: This indicates that no CUDA-capable devices were detected by the - #: installed CUDA driver. - CUDA_ERROR_NO_DEVICE = cydriver.cudaError_enum.CUDA_ERROR_NO_DEVICE{{endif}} + CUDA_ERROR_NO_DEVICE = ( + cydriver.cudaError_enum.CUDA_ERROR_NO_DEVICE, + 'This indicates that no CUDA-capable devices were detected by the installed\n' + 'CUDA driver.\n' + ){{endif}} {{if 'CUDA_ERROR_INVALID_DEVICE' in found_values}} - #: This indicates that the device ordinal supplied by the user does not - #: correspond to a valid CUDA device or that the action requested is - #: invalid for the specified device. - CUDA_ERROR_INVALID_DEVICE = cydriver.cudaError_enum.CUDA_ERROR_INVALID_DEVICE{{endif}} + CUDA_ERROR_INVALID_DEVICE = ( + cydriver.cudaError_enum.CUDA_ERROR_INVALID_DEVICE, + 'This indicates that the device ordinal supplied by the user does not\n' + 'correspond to a valid CUDA device or that the action requested is invalid\n' + 'for the specified device.\n' + ){{endif}} {{if 'CUDA_ERROR_DEVICE_NOT_LICENSED' in found_values}} - #: This error indicates that the Grid license is not applied. - CUDA_ERROR_DEVICE_NOT_LICENSED = cydriver.cudaError_enum.CUDA_ERROR_DEVICE_NOT_LICENSED{{endif}} + CUDA_ERROR_DEVICE_NOT_LICENSED = ( + cydriver.cudaError_enum.CUDA_ERROR_DEVICE_NOT_LICENSED, + 'This error indicates that the Grid license is not applied.\n' + ){{endif}} {{if 'CUDA_ERROR_INVALID_IMAGE' in found_values}} - #: This indicates that the device kernel image is invalid. This can - #: also indicate an invalid CUDA module. - CUDA_ERROR_INVALID_IMAGE = cydriver.cudaError_enum.CUDA_ERROR_INVALID_IMAGE{{endif}} + CUDA_ERROR_INVALID_IMAGE = ( + cydriver.cudaError_enum.CUDA_ERROR_INVALID_IMAGE, + 'This indicates that the device kernel image is invalid. This can also\n' + 'indicate an invalid CUDA module.\n' + ){{endif}} {{if 'CUDA_ERROR_INVALID_CONTEXT' in found_values}} - #: This most frequently indicates that there is no context bound to the - #: current thread. This can also be returned if the context passed to - #: an API call is not a valid handle (such as a context that has had - #: :py:obj:`~.cuCtxDestroy()` invoked on it). This can also be returned - #: if a user mixes different API versions (i.e. 3010 context with 3020 - #: API calls). See :py:obj:`~.cuCtxGetApiVersion()` for more details. - #: This can also be returned if the green context passed to an API call - #: was not converted to a :py:obj:`~.CUcontext` using - #: :py:obj:`~.cuCtxFromGreenCtx` API. - CUDA_ERROR_INVALID_CONTEXT = cydriver.cudaError_enum.CUDA_ERROR_INVALID_CONTEXT{{endif}} + CUDA_ERROR_INVALID_CONTEXT = ( + cydriver.cudaError_enum.CUDA_ERROR_INVALID_CONTEXT, + 'This most frequently indicates that there is no context bound to the\n' + 'current thread. This can also be returned if the context passed to an API\n' + 'call is not a valid handle (such as a context that has had\n' + ':py:obj:`~.cuCtxDestroy()` invoked on it). This can also be returned if a\n' + 'user mixes different API versions (i.e. 3010 context with 3020 API calls).\n' + 'See :py:obj:`~.cuCtxGetApiVersion()` for more details. This can also be\n' + 'returned if the green context passed to an API call was not converted to a\n' + ':py:obj:`~.CUcontext` using :py:obj:`~.cuCtxFromGreenCtx` API.\n' + ){{endif}} {{if 'CUDA_ERROR_CONTEXT_ALREADY_CURRENT' in found_values}} - #: This indicated that the context being supplied as a parameter to the - #: API call was already the active context. [Deprecated] - CUDA_ERROR_CONTEXT_ALREADY_CURRENT = cydriver.cudaError_enum.CUDA_ERROR_CONTEXT_ALREADY_CURRENT{{endif}} + CUDA_ERROR_CONTEXT_ALREADY_CURRENT = ( + cydriver.cudaError_enum.CUDA_ERROR_CONTEXT_ALREADY_CURRENT, + 'This indicated that the context being supplied as a parameter to the API\n' + 'call was already the active context. [Deprecated]\n' + ){{endif}} {{if 'CUDA_ERROR_MAP_FAILED' in found_values}} - #: This indicates that a map or register operation has failed. - CUDA_ERROR_MAP_FAILED = cydriver.cudaError_enum.CUDA_ERROR_MAP_FAILED{{endif}} + CUDA_ERROR_MAP_FAILED = ( + cydriver.cudaError_enum.CUDA_ERROR_MAP_FAILED, + 'This indicates that a map or register operation has failed.\n' + ){{endif}} {{if 'CUDA_ERROR_UNMAP_FAILED' in found_values}} - #: This indicates that an unmap or unregister operation has failed. - CUDA_ERROR_UNMAP_FAILED = cydriver.cudaError_enum.CUDA_ERROR_UNMAP_FAILED{{endif}} + CUDA_ERROR_UNMAP_FAILED = ( + cydriver.cudaError_enum.CUDA_ERROR_UNMAP_FAILED, + 'This indicates that an unmap or unregister operation has failed.\n' + ){{endif}} {{if 'CUDA_ERROR_ARRAY_IS_MAPPED' in found_values}} - #: This indicates that the specified array is currently mapped and thus - #: cannot be destroyed. - CUDA_ERROR_ARRAY_IS_MAPPED = cydriver.cudaError_enum.CUDA_ERROR_ARRAY_IS_MAPPED{{endif}} + CUDA_ERROR_ARRAY_IS_MAPPED = ( + cydriver.cudaError_enum.CUDA_ERROR_ARRAY_IS_MAPPED, + 'This indicates that the specified array is currently mapped and thus cannot\n' + 'be destroyed.\n' + ){{endif}} {{if 'CUDA_ERROR_ALREADY_MAPPED' in found_values}} - #: This indicates that the resource is already mapped. - CUDA_ERROR_ALREADY_MAPPED = cydriver.cudaError_enum.CUDA_ERROR_ALREADY_MAPPED{{endif}} + CUDA_ERROR_ALREADY_MAPPED = ( + cydriver.cudaError_enum.CUDA_ERROR_ALREADY_MAPPED, + 'This indicates that the resource is already mapped.\n' + ){{endif}} {{if 'CUDA_ERROR_NO_BINARY_FOR_GPU' in found_values}} - #: This indicates that there is no kernel image available that is - #: suitable for the device. This can occur when a user specifies code - #: generation options for a particular CUDA source file that do not - #: include the corresponding device configuration. - CUDA_ERROR_NO_BINARY_FOR_GPU = cydriver.cudaError_enum.CUDA_ERROR_NO_BINARY_FOR_GPU{{endif}} + CUDA_ERROR_NO_BINARY_FOR_GPU = ( + cydriver.cudaError_enum.CUDA_ERROR_NO_BINARY_FOR_GPU, + 'This indicates that there is no kernel image available that is suitable for\n' + 'the device. This can occur when a user specifies code generation options\n' + 'for a particular CUDA source file that do not include the corresponding\n' + 'device configuration.\n' + ){{endif}} {{if 'CUDA_ERROR_ALREADY_ACQUIRED' in found_values}} - #: This indicates that a resource has already been acquired. - CUDA_ERROR_ALREADY_ACQUIRED = cydriver.cudaError_enum.CUDA_ERROR_ALREADY_ACQUIRED{{endif}} + CUDA_ERROR_ALREADY_ACQUIRED = ( + cydriver.cudaError_enum.CUDA_ERROR_ALREADY_ACQUIRED, + 'This indicates that a resource has already been acquired.\n' + ){{endif}} {{if 'CUDA_ERROR_NOT_MAPPED' in found_values}} - #: This indicates that a resource is not mapped. - CUDA_ERROR_NOT_MAPPED = cydriver.cudaError_enum.CUDA_ERROR_NOT_MAPPED{{endif}} + CUDA_ERROR_NOT_MAPPED = ( + cydriver.cudaError_enum.CUDA_ERROR_NOT_MAPPED, + 'This indicates that a resource is not mapped.\n' + ){{endif}} {{if 'CUDA_ERROR_NOT_MAPPED_AS_ARRAY' in found_values}} - #: This indicates that a mapped resource is not available for access as - #: an array. - CUDA_ERROR_NOT_MAPPED_AS_ARRAY = cydriver.cudaError_enum.CUDA_ERROR_NOT_MAPPED_AS_ARRAY{{endif}} + CUDA_ERROR_NOT_MAPPED_AS_ARRAY = ( + cydriver.cudaError_enum.CUDA_ERROR_NOT_MAPPED_AS_ARRAY, + 'This indicates that a mapped resource is not available for access as an\n' + 'array.\n' + ){{endif}} {{if 'CUDA_ERROR_NOT_MAPPED_AS_POINTER' in found_values}} - #: This indicates that a mapped resource is not available for access as - #: a pointer. - CUDA_ERROR_NOT_MAPPED_AS_POINTER = cydriver.cudaError_enum.CUDA_ERROR_NOT_MAPPED_AS_POINTER{{endif}} + CUDA_ERROR_NOT_MAPPED_AS_POINTER = ( + cydriver.cudaError_enum.CUDA_ERROR_NOT_MAPPED_AS_POINTER, + 'This indicates that a mapped resource is not available for access as a\n' + 'pointer.\n' + ){{endif}} {{if 'CUDA_ERROR_ECC_UNCORRECTABLE' in found_values}} - #: This indicates that an uncorrectable ECC error was detected during - #: execution. - CUDA_ERROR_ECC_UNCORRECTABLE = cydriver.cudaError_enum.CUDA_ERROR_ECC_UNCORRECTABLE{{endif}} + CUDA_ERROR_ECC_UNCORRECTABLE = ( + cydriver.cudaError_enum.CUDA_ERROR_ECC_UNCORRECTABLE, + 'This indicates that an uncorrectable ECC error was detected during\n' + 'execution.\n' + ){{endif}} {{if 'CUDA_ERROR_UNSUPPORTED_LIMIT' in found_values}} - #: This indicates that the :py:obj:`~.CUlimit` passed to the API call - #: is not supported by the active device. - CUDA_ERROR_UNSUPPORTED_LIMIT = cydriver.cudaError_enum.CUDA_ERROR_UNSUPPORTED_LIMIT{{endif}} + CUDA_ERROR_UNSUPPORTED_LIMIT = ( + cydriver.cudaError_enum.CUDA_ERROR_UNSUPPORTED_LIMIT, + 'This indicates that the :py:obj:`~.CUlimit` passed to the API call is not\n' + 'supported by the active device.\n' + ){{endif}} {{if 'CUDA_ERROR_CONTEXT_ALREADY_IN_USE' in found_values}} - #: This indicates that the :py:obj:`~.CUcontext` passed to the API call - #: can only be bound to a single CPU thread at a time but is already - #: bound to a CPU thread. - CUDA_ERROR_CONTEXT_ALREADY_IN_USE = cydriver.cudaError_enum.CUDA_ERROR_CONTEXT_ALREADY_IN_USE{{endif}} + CUDA_ERROR_CONTEXT_ALREADY_IN_USE = ( + cydriver.cudaError_enum.CUDA_ERROR_CONTEXT_ALREADY_IN_USE, + 'This indicates that the :py:obj:`~.CUcontext` passed to the API call can\n' + 'only be bound to a single CPU thread at a time but is already bound to a\n' + 'CPU thread.\n' + ){{endif}} {{if 'CUDA_ERROR_PEER_ACCESS_UNSUPPORTED' in found_values}} - #: This indicates that peer access is not supported across the given - #: devices. - CUDA_ERROR_PEER_ACCESS_UNSUPPORTED = cydriver.cudaError_enum.CUDA_ERROR_PEER_ACCESS_UNSUPPORTED{{endif}} + CUDA_ERROR_PEER_ACCESS_UNSUPPORTED = ( + cydriver.cudaError_enum.CUDA_ERROR_PEER_ACCESS_UNSUPPORTED, + 'This indicates that peer access is not supported across the given devices.\n' + ){{endif}} {{if 'CUDA_ERROR_INVALID_PTX' in found_values}} - #: This indicates that a PTX JIT compilation failed. - CUDA_ERROR_INVALID_PTX = cydriver.cudaError_enum.CUDA_ERROR_INVALID_PTX{{endif}} + CUDA_ERROR_INVALID_PTX = ( + cydriver.cudaError_enum.CUDA_ERROR_INVALID_PTX, + 'This indicates that a PTX JIT compilation failed.\n' + ){{endif}} {{if 'CUDA_ERROR_INVALID_GRAPHICS_CONTEXT' in found_values}} - #: This indicates an error with OpenGL or DirectX context. - CUDA_ERROR_INVALID_GRAPHICS_CONTEXT = cydriver.cudaError_enum.CUDA_ERROR_INVALID_GRAPHICS_CONTEXT{{endif}} + CUDA_ERROR_INVALID_GRAPHICS_CONTEXT = ( + cydriver.cudaError_enum.CUDA_ERROR_INVALID_GRAPHICS_CONTEXT, + 'This indicates an error with OpenGL or DirectX context.\n' + ){{endif}} {{if 'CUDA_ERROR_NVLINK_UNCORRECTABLE' in found_values}} - #: This indicates that an uncorrectable NVLink error was detected - #: during the execution. - CUDA_ERROR_NVLINK_UNCORRECTABLE = cydriver.cudaError_enum.CUDA_ERROR_NVLINK_UNCORRECTABLE{{endif}} + CUDA_ERROR_NVLINK_UNCORRECTABLE = ( + cydriver.cudaError_enum.CUDA_ERROR_NVLINK_UNCORRECTABLE, + 'This indicates that an uncorrectable NVLink error was detected during the\n' + 'execution.\n' + ){{endif}} {{if 'CUDA_ERROR_JIT_COMPILER_NOT_FOUND' in found_values}} - #: This indicates that the PTX JIT compiler library was not found. - CUDA_ERROR_JIT_COMPILER_NOT_FOUND = cydriver.cudaError_enum.CUDA_ERROR_JIT_COMPILER_NOT_FOUND{{endif}} + CUDA_ERROR_JIT_COMPILER_NOT_FOUND = ( + cydriver.cudaError_enum.CUDA_ERROR_JIT_COMPILER_NOT_FOUND, + 'This indicates that the PTX JIT compiler library was not found.\n' + ){{endif}} {{if 'CUDA_ERROR_UNSUPPORTED_PTX_VERSION' in found_values}} - #: This indicates that the provided PTX was compiled with an - #: unsupported toolchain. - CUDA_ERROR_UNSUPPORTED_PTX_VERSION = cydriver.cudaError_enum.CUDA_ERROR_UNSUPPORTED_PTX_VERSION{{endif}} + CUDA_ERROR_UNSUPPORTED_PTX_VERSION = ( + cydriver.cudaError_enum.CUDA_ERROR_UNSUPPORTED_PTX_VERSION, + 'This indicates that the provided PTX was compiled with an unsupported\n' + 'toolchain.\n' + ){{endif}} {{if 'CUDA_ERROR_JIT_COMPILATION_DISABLED' in found_values}} - #: This indicates that the PTX JIT compilation was disabled. - CUDA_ERROR_JIT_COMPILATION_DISABLED = cydriver.cudaError_enum.CUDA_ERROR_JIT_COMPILATION_DISABLED{{endif}} + CUDA_ERROR_JIT_COMPILATION_DISABLED = ( + cydriver.cudaError_enum.CUDA_ERROR_JIT_COMPILATION_DISABLED, + 'This indicates that the PTX JIT compilation was disabled.\n' + ){{endif}} {{if 'CUDA_ERROR_UNSUPPORTED_EXEC_AFFINITY' in found_values}} - #: This indicates that the :py:obj:`~.CUexecAffinityType` passed to the - #: API call is not supported by the active device. - CUDA_ERROR_UNSUPPORTED_EXEC_AFFINITY = cydriver.cudaError_enum.CUDA_ERROR_UNSUPPORTED_EXEC_AFFINITY{{endif}} + CUDA_ERROR_UNSUPPORTED_EXEC_AFFINITY = ( + cydriver.cudaError_enum.CUDA_ERROR_UNSUPPORTED_EXEC_AFFINITY, + 'This indicates that the :py:obj:`~.CUexecAffinityType` passed to the API\n' + 'call is not supported by the active device.\n' + ){{endif}} {{if 'CUDA_ERROR_UNSUPPORTED_DEVSIDE_SYNC' in found_values}} - #: This indicates that the code to be compiled by the PTX JIT contains - #: unsupported call to cudaDeviceSynchronize. - CUDA_ERROR_UNSUPPORTED_DEVSIDE_SYNC = cydriver.cudaError_enum.CUDA_ERROR_UNSUPPORTED_DEVSIDE_SYNC{{endif}} + CUDA_ERROR_UNSUPPORTED_DEVSIDE_SYNC = ( + cydriver.cudaError_enum.CUDA_ERROR_UNSUPPORTED_DEVSIDE_SYNC, + 'This indicates that the code to be compiled by the PTX JIT contains\n' + 'unsupported call to cudaDeviceSynchronize.\n' + ){{endif}} {{if 'CUDA_ERROR_CONTAINED' in found_values}} - #: This indicates that an exception occurred on the device that is now - #: contained by the GPU's error containment capability. Common causes - #: are - a. Certain types of invalid accesses of peer GPU memory over - #: nvlink b. Certain classes of hardware errors This leaves the process - #: in an inconsistent state and any further CUDA work will return the - #: same error. To continue using CUDA, the process must be terminated - #: and relaunched. - CUDA_ERROR_CONTAINED = cydriver.cudaError_enum.CUDA_ERROR_CONTAINED{{endif}} + CUDA_ERROR_CONTAINED = ( + cydriver.cudaError_enum.CUDA_ERROR_CONTAINED, + 'This indicates that an exception occurred on the device that is now\n' + "contained by the GPU's error containment capability. Common causes are - a.\n" + 'Certain types of invalid accesses of peer GPU memory over nvlink b. Certain\n' + 'classes of hardware errors This leaves the process in an inconsistent state\n' + 'and any further CUDA work will return the same error. To continue using\n' + 'CUDA, the process must be terminated and relaunched.\n' + ){{endif}} {{if 'CUDA_ERROR_INVALID_SOURCE' in found_values}} - #: This indicates that the device kernel source is invalid. This - #: includes compilation/linker errors encountered in device code or - #: user error. - CUDA_ERROR_INVALID_SOURCE = cydriver.cudaError_enum.CUDA_ERROR_INVALID_SOURCE{{endif}} + CUDA_ERROR_INVALID_SOURCE = ( + cydriver.cudaError_enum.CUDA_ERROR_INVALID_SOURCE, + 'This indicates that the device kernel source is invalid. This includes\n' + 'compilation/linker errors encountered in device code or user error.\n' + ){{endif}} {{if 'CUDA_ERROR_FILE_NOT_FOUND' in found_values}} - #: This indicates that the file specified was not found. - CUDA_ERROR_FILE_NOT_FOUND = cydriver.cudaError_enum.CUDA_ERROR_FILE_NOT_FOUND{{endif}} + CUDA_ERROR_FILE_NOT_FOUND = ( + cydriver.cudaError_enum.CUDA_ERROR_FILE_NOT_FOUND, + 'This indicates that the file specified was not found.\n' + ){{endif}} {{if 'CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND' in found_values}} - #: This indicates that a link to a shared object failed to resolve. - CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND = cydriver.cudaError_enum.CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND{{endif}} + CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND = ( + cydriver.cudaError_enum.CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND, + 'This indicates that a link to a shared object failed to resolve.\n' + ){{endif}} {{if 'CUDA_ERROR_SHARED_OBJECT_INIT_FAILED' in found_values}} - #: This indicates that initialization of a shared object failed. - CUDA_ERROR_SHARED_OBJECT_INIT_FAILED = cydriver.cudaError_enum.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED{{endif}} + CUDA_ERROR_SHARED_OBJECT_INIT_FAILED = ( + cydriver.cudaError_enum.CUDA_ERROR_SHARED_OBJECT_INIT_FAILED, + 'This indicates that initialization of a shared object failed.\n' + ){{endif}} {{if 'CUDA_ERROR_OPERATING_SYSTEM' in found_values}} - #: This indicates that an OS call failed. - CUDA_ERROR_OPERATING_SYSTEM = cydriver.cudaError_enum.CUDA_ERROR_OPERATING_SYSTEM{{endif}} + CUDA_ERROR_OPERATING_SYSTEM = ( + cydriver.cudaError_enum.CUDA_ERROR_OPERATING_SYSTEM, + 'This indicates that an OS call failed.\n' + ){{endif}} {{if 'CUDA_ERROR_INVALID_HANDLE' in found_values}} - #: This indicates that a resource handle passed to the API call was not - #: valid. Resource handles are opaque types like :py:obj:`~.CUstream` - #: and :py:obj:`~.CUevent`. - CUDA_ERROR_INVALID_HANDLE = cydriver.cudaError_enum.CUDA_ERROR_INVALID_HANDLE{{endif}} + CUDA_ERROR_INVALID_HANDLE = ( + cydriver.cudaError_enum.CUDA_ERROR_INVALID_HANDLE, + 'This indicates that a resource handle passed to the API call was not valid.\n' + 'Resource handles are opaque types like :py:obj:`~.CUstream` and\n' + ':py:obj:`~.CUevent`.\n' + ){{endif}} {{if 'CUDA_ERROR_ILLEGAL_STATE' in found_values}} - #: This indicates that a resource required by the API call is not in a - #: valid state to perform the requested operation. - CUDA_ERROR_ILLEGAL_STATE = cydriver.cudaError_enum.CUDA_ERROR_ILLEGAL_STATE{{endif}} + CUDA_ERROR_ILLEGAL_STATE = ( + cydriver.cudaError_enum.CUDA_ERROR_ILLEGAL_STATE, + 'This indicates that a resource required by the API call is not in a valid\n' + 'state to perform the requested operation.\n' + ){{endif}} {{if 'CUDA_ERROR_LOSSY_QUERY' in found_values}} - #: This indicates an attempt was made to introspect an object in a way - #: that would discard semantically important information. This is - #: either due to the object using funtionality newer than the API - #: version used to introspect it or omission of optional return - #: arguments. - CUDA_ERROR_LOSSY_QUERY = cydriver.cudaError_enum.CUDA_ERROR_LOSSY_QUERY{{endif}} + CUDA_ERROR_LOSSY_QUERY = ( + cydriver.cudaError_enum.CUDA_ERROR_LOSSY_QUERY, + 'This indicates an attempt was made to introspect an object in a way that\n' + 'would discard semantically important information. This is either due to the\n' + 'object using funtionality newer than the API version used to introspect it\n' + 'or omission of optional return arguments.\n' + ){{endif}} {{if 'CUDA_ERROR_NOT_FOUND' in found_values}} - #: This indicates that a named symbol was not found. Examples of - #: symbols are global/constant variable names, driver function names, - #: texture names, and surface names. - CUDA_ERROR_NOT_FOUND = cydriver.cudaError_enum.CUDA_ERROR_NOT_FOUND{{endif}} + CUDA_ERROR_NOT_FOUND = ( + cydriver.cudaError_enum.CUDA_ERROR_NOT_FOUND, + 'This indicates that a named symbol was not found. Examples of symbols are\n' + 'global/constant variable names, driver function names, texture names, and\n' + 'surface names.\n' + ){{endif}} {{if 'CUDA_ERROR_NOT_READY' in found_values}} - #: This indicates that asynchronous operations issued previously have - #: not completed yet. This result is not actually an error, but must be - #: indicated differently than :py:obj:`~.CUDA_SUCCESS` (which indicates - #: completion). Calls that may return this value include - #: :py:obj:`~.cuEventQuery()` and :py:obj:`~.cuStreamQuery()`. - CUDA_ERROR_NOT_READY = cydriver.cudaError_enum.CUDA_ERROR_NOT_READY{{endif}} + CUDA_ERROR_NOT_READY = ( + cydriver.cudaError_enum.CUDA_ERROR_NOT_READY, + 'This indicates that asynchronous operations issued previously have not\n' + 'completed yet. This result is not actually an error, but must be indicated\n' + 'differently than :py:obj:`~.CUDA_SUCCESS` (which indicates completion).\n' + 'Calls that may return this value include :py:obj:`~.cuEventQuery()` and\n' + ':py:obj:`~.cuStreamQuery()`.\n' + ){{endif}} {{if 'CUDA_ERROR_ILLEGAL_ADDRESS' in found_values}} - #: While executing a kernel, the device encountered a load or store - #: instruction on an invalid memory address. This leaves the process in - #: an inconsistent state and any further CUDA work will return the same - #: error. To continue using CUDA, the process must be terminated and - #: relaunched. - CUDA_ERROR_ILLEGAL_ADDRESS = cydriver.cudaError_enum.CUDA_ERROR_ILLEGAL_ADDRESS{{endif}} + CUDA_ERROR_ILLEGAL_ADDRESS = ( + cydriver.cudaError_enum.CUDA_ERROR_ILLEGAL_ADDRESS, + 'While executing a kernel, the device encountered a load or store\n' + 'instruction on an invalid memory address. This leaves the process in an\n' + 'inconsistent state and any further CUDA work will return the same error. To\n' + 'continue using CUDA, the process must be terminated and relaunched.\n' + ){{endif}} {{if 'CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES' in found_values}} - #: This indicates that a launch did not occur because it did not have - #: appropriate resources. This error usually indicates that the user - #: has attempted to pass too many arguments to the device kernel, or - #: the kernel launch specifies too many threads for the kernel's - #: register count. Passing arguments of the wrong size (i.e. a 64-bit - #: pointer when a 32-bit int is expected) is equivalent to passing too - #: many arguments and can also result in this error. - CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES = cydriver.cudaError_enum.CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES{{endif}} + CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES = ( + cydriver.cudaError_enum.CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES, + 'This indicates that a launch did not occur because it did not have\n' + 'appropriate resources. This error usually indicates that the user has\n' + 'attempted to pass too many arguments to the device kernel, or the kernel\n' + "launch specifies too many threads for the kernel's register count. Passing\n" + 'arguments of the wrong size (i.e. a 64-bit pointer when a 32-bit int is\n' + 'expected) is equivalent to passing too many arguments and can also result\n' + 'in this error.\n' + ){{endif}} {{if 'CUDA_ERROR_LAUNCH_TIMEOUT' in found_values}} - #: This indicates that the device kernel took too long to execute. This - #: can only occur if timeouts are enabled - see the device attribute - #: :py:obj:`~.CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT` for more - #: information. This leaves the process in an inconsistent state and - #: any further CUDA work will return the same error. To continue using - #: CUDA, the process must be terminated and relaunched. - CUDA_ERROR_LAUNCH_TIMEOUT = cydriver.cudaError_enum.CUDA_ERROR_LAUNCH_TIMEOUT{{endif}} + CUDA_ERROR_LAUNCH_TIMEOUT = ( + cydriver.cudaError_enum.CUDA_ERROR_LAUNCH_TIMEOUT, + 'This indicates that the device kernel took too long to execute. This can\n' + 'only occur if timeouts are enabled - see the device attribute\n' + ':py:obj:`~.CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT` for more information.\n' + 'This leaves the process in an inconsistent state and any further CUDA work\n' + 'will return the same error. To continue using CUDA, the process must be\n' + 'terminated and relaunched.\n' + ){{endif}} {{if 'CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING' in found_values}} - #: This error indicates a kernel launch that uses an incompatible - #: texturing mode. - CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING = cydriver.cudaError_enum.CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING{{endif}} + CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING = ( + cydriver.cudaError_enum.CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING, + 'This error indicates a kernel launch that uses an incompatible texturing\n' + 'mode.\n' + ){{endif}} {{if 'CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED' in found_values}} - #: This error indicates that a call to - #: :py:obj:`~.cuCtxEnablePeerAccess()` is trying to re-enable peer - #: access to a context which has already had peer access to it enabled. - CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED = cydriver.cudaError_enum.CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED{{endif}} + CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED = ( + cydriver.cudaError_enum.CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED, + 'This error indicates that a call to :py:obj:`~.cuCtxEnablePeerAccess()` is\n' + 'trying to re-enable peer access to a context which has already had peer\n' + 'access to it enabled.\n' + ){{endif}} {{if 'CUDA_ERROR_PEER_ACCESS_NOT_ENABLED' in found_values}} - #: This error indicates that :py:obj:`~.cuCtxDisablePeerAccess()` is - #: trying to disable peer access which has not been enabled yet via - #: :py:obj:`~.cuCtxEnablePeerAccess()`. - CUDA_ERROR_PEER_ACCESS_NOT_ENABLED = cydriver.cudaError_enum.CUDA_ERROR_PEER_ACCESS_NOT_ENABLED{{endif}} + CUDA_ERROR_PEER_ACCESS_NOT_ENABLED = ( + cydriver.cudaError_enum.CUDA_ERROR_PEER_ACCESS_NOT_ENABLED, + 'This error indicates that :py:obj:`~.cuCtxDisablePeerAccess()` is trying to\n' + 'disable peer access which has not been enabled yet via\n' + ':py:obj:`~.cuCtxEnablePeerAccess()`.\n' + ){{endif}} {{if 'CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE' in found_values}} - #: This error indicates that the primary context for the specified - #: device has already been initialized. - CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE = cydriver.cudaError_enum.CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE{{endif}} + CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE = ( + cydriver.cudaError_enum.CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE, + 'This error indicates that the primary context for the specified device has\n' + 'already been initialized.\n' + ){{endif}} {{if 'CUDA_ERROR_CONTEXT_IS_DESTROYED' in found_values}} - #: This error indicates that the context current to the calling thread - #: has been destroyed using :py:obj:`~.cuCtxDestroy`, or is a primary - #: context which has not yet been initialized. - CUDA_ERROR_CONTEXT_IS_DESTROYED = cydriver.cudaError_enum.CUDA_ERROR_CONTEXT_IS_DESTROYED{{endif}} + CUDA_ERROR_CONTEXT_IS_DESTROYED = ( + cydriver.cudaError_enum.CUDA_ERROR_CONTEXT_IS_DESTROYED, + 'This error indicates that the context current to the calling thread has\n' + 'been destroyed using :py:obj:`~.cuCtxDestroy`, or is a primary context\n' + 'which has not yet been initialized.\n' + ){{endif}} {{if 'CUDA_ERROR_ASSERT' in found_values}} - #: A device-side assert triggered during kernel execution. The context - #: cannot be used anymore, and must be destroyed. All existing device - #: memory allocations from this context are invalid and must be - #: reconstructed if the program is to continue using CUDA. - CUDA_ERROR_ASSERT = cydriver.cudaError_enum.CUDA_ERROR_ASSERT{{endif}} + CUDA_ERROR_ASSERT = ( + cydriver.cudaError_enum.CUDA_ERROR_ASSERT, + 'A device-side assert triggered during kernel execution. The context cannot\n' + 'be used anymore, and must be destroyed. All existing device memory\n' + 'allocations from this context are invalid and must be reconstructed if the\n' + 'program is to continue using CUDA.\n' + ){{endif}} {{if 'CUDA_ERROR_TOO_MANY_PEERS' in found_values}} - #: This error indicates that the hardware resources required to enable - #: peer access have been exhausted for one or more of the devices - #: passed to :py:obj:`~.cuCtxEnablePeerAccess()`. - CUDA_ERROR_TOO_MANY_PEERS = cydriver.cudaError_enum.CUDA_ERROR_TOO_MANY_PEERS{{endif}} + CUDA_ERROR_TOO_MANY_PEERS = ( + cydriver.cudaError_enum.CUDA_ERROR_TOO_MANY_PEERS, + 'This error indicates that the hardware resources required to enable peer\n' + 'access have been exhausted for one or more of the devices passed to\n' + ':py:obj:`~.cuCtxEnablePeerAccess()`.\n' + ){{endif}} {{if 'CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED' in found_values}} - #: This error indicates that the memory range passed to - #: :py:obj:`~.cuMemHostRegister()` has already been registered. - CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED = cydriver.cudaError_enum.CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED{{endif}} + CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED = ( + cydriver.cudaError_enum.CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED, + 'This error indicates that the memory range passed to\n' + ':py:obj:`~.cuMemHostRegister()` has already been registered.\n' + ){{endif}} {{if 'CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED' in found_values}} - #: This error indicates that the pointer passed to - #: :py:obj:`~.cuMemHostUnregister()` does not correspond to any - #: currently registered memory region. - CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED = cydriver.cudaError_enum.CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED{{endif}} + CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED = ( + cydriver.cudaError_enum.CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED, + 'This error indicates that the pointer passed to\n' + ':py:obj:`~.cuMemHostUnregister()` does not correspond to any currently\n' + 'registered memory region.\n' + ){{endif}} {{if 'CUDA_ERROR_HARDWARE_STACK_ERROR' in found_values}} - #: While executing a kernel, the device encountered a stack error. This - #: can be due to stack corruption or exceeding the stack size limit. - #: This leaves the process in an inconsistent state and any further - #: CUDA work will return the same error. To continue using CUDA, the - #: process must be terminated and relaunched. - CUDA_ERROR_HARDWARE_STACK_ERROR = cydriver.cudaError_enum.CUDA_ERROR_HARDWARE_STACK_ERROR{{endif}} + CUDA_ERROR_HARDWARE_STACK_ERROR = ( + cydriver.cudaError_enum.CUDA_ERROR_HARDWARE_STACK_ERROR, + 'While executing a kernel, the device encountered a stack error. This can be\n' + 'due to stack corruption or exceeding the stack size limit. This leaves the\n' + 'process in an inconsistent state and any further CUDA work will return the\n' + 'same error. To continue using CUDA, the process must be terminated and\n' + 'relaunched.\n' + ){{endif}} {{if 'CUDA_ERROR_ILLEGAL_INSTRUCTION' in found_values}} - #: While executing a kernel, the device encountered an illegal - #: instruction. This leaves the process in an inconsistent state and - #: any further CUDA work will return the same error. To continue using - #: CUDA, the process must be terminated and relaunched. - CUDA_ERROR_ILLEGAL_INSTRUCTION = cydriver.cudaError_enum.CUDA_ERROR_ILLEGAL_INSTRUCTION{{endif}} + CUDA_ERROR_ILLEGAL_INSTRUCTION = ( + cydriver.cudaError_enum.CUDA_ERROR_ILLEGAL_INSTRUCTION, + 'While executing a kernel, the device encountered an illegal instruction.\n' + 'This leaves the process in an inconsistent state and any further CUDA work\n' + 'will return the same error. To continue using CUDA, the process must be\n' + 'terminated and relaunched.\n' + ){{endif}} {{if 'CUDA_ERROR_MISALIGNED_ADDRESS' in found_values}} - #: While executing a kernel, the device encountered a load or store - #: instruction on a memory address which is not aligned. This leaves - #: the process in an inconsistent state and any further CUDA work will - #: return the same error. To continue using CUDA, the process must be - #: terminated and relaunched. - CUDA_ERROR_MISALIGNED_ADDRESS = cydriver.cudaError_enum.CUDA_ERROR_MISALIGNED_ADDRESS{{endif}} + CUDA_ERROR_MISALIGNED_ADDRESS = ( + cydriver.cudaError_enum.CUDA_ERROR_MISALIGNED_ADDRESS, + 'While executing a kernel, the device encountered a load or store\n' + 'instruction on a memory address which is not aligned. This leaves the\n' + 'process in an inconsistent state and any further CUDA work will return the\n' + 'same error. To continue using CUDA, the process must be terminated and\n' + 'relaunched.\n' + ){{endif}} {{if 'CUDA_ERROR_INVALID_ADDRESS_SPACE' in found_values}} - #: While executing a kernel, the device encountered an instruction - #: which can only operate on memory locations in certain address spaces - #: (global, shared, or local), but was supplied a memory address not - #: belonging to an allowed address space. This leaves the process in an - #: inconsistent state and any further CUDA work will return the same - #: error. To continue using CUDA, the process must be terminated and - #: relaunched. - CUDA_ERROR_INVALID_ADDRESS_SPACE = cydriver.cudaError_enum.CUDA_ERROR_INVALID_ADDRESS_SPACE{{endif}} + CUDA_ERROR_INVALID_ADDRESS_SPACE = ( + cydriver.cudaError_enum.CUDA_ERROR_INVALID_ADDRESS_SPACE, + 'While executing a kernel, the device encountered an instruction which can\n' + 'only operate on memory locations in certain address spaces (global, shared,\n' + 'or local), but was supplied a memory address not belonging to an allowed\n' + 'address space. This leaves the process in an inconsistent state and any\n' + 'further CUDA work will return the same error. To continue using CUDA, the\n' + 'process must be terminated and relaunched.\n' + ){{endif}} {{if 'CUDA_ERROR_INVALID_PC' in found_values}} - #: While executing a kernel, the device program counter wrapped its - #: address space. This leaves the process in an inconsistent state and - #: any further CUDA work will return the same error. To continue using - #: CUDA, the process must be terminated and relaunched. - CUDA_ERROR_INVALID_PC = cydriver.cudaError_enum.CUDA_ERROR_INVALID_PC{{endif}} + CUDA_ERROR_INVALID_PC = ( + cydriver.cudaError_enum.CUDA_ERROR_INVALID_PC, + 'While executing a kernel, the device program counter wrapped its address\n' + 'space. This leaves the process in an inconsistent state and any further\n' + 'CUDA work will return the same error. To continue using CUDA, the process\n' + 'must be terminated and relaunched.\n' + ){{endif}} {{if 'CUDA_ERROR_LAUNCH_FAILED' in found_values}} - #: An exception occurred on the device while executing a kernel. Common - #: causes include dereferencing an invalid device pointer and accessing - #: out of bounds shared memory. Less common cases can be system - #: specific - more information about these cases can be found in the - #: system specific user guide. This leaves the process in an - #: inconsistent state and any further CUDA work will return the same - #: error. To continue using CUDA, the process must be terminated and - #: relaunched. - CUDA_ERROR_LAUNCH_FAILED = cydriver.cudaError_enum.CUDA_ERROR_LAUNCH_FAILED{{endif}} + CUDA_ERROR_LAUNCH_FAILED = ( + cydriver.cudaError_enum.CUDA_ERROR_LAUNCH_FAILED, + 'An exception occurred on the device while executing a kernel. Common causes\n' + 'include dereferencing an invalid device pointer and accessing out of bounds\n' + 'shared memory. Less common cases can be system specific - more information\n' + 'about these cases can be found in the system specific user guide. This\n' + 'leaves the process in an inconsistent state and any further CUDA work will\n' + 'return the same error. To continue using CUDA, the process must be\n' + 'terminated and relaunched.\n' + ){{endif}} {{if 'CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE' in found_values}} - #: This error indicates that the number of blocks launched per grid for - #: a kernel that was launched via either - #: :py:obj:`~.cuLaunchCooperativeKernel` or - #: :py:obj:`~.cuLaunchCooperativeKernelMultiDevice` exceeds the maximum - #: number of blocks as allowed by - #: :py:obj:`~.cuOccupancyMaxActiveBlocksPerMultiprocessor` or - #: :py:obj:`~.cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags` - #: times the number of multiprocessors as specified by the device - #: attribute :py:obj:`~.CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT`. - CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE = cydriver.cudaError_enum.CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE{{endif}} + CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE = ( + cydriver.cudaError_enum.CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE, + 'This error indicates that the number of blocks launched per grid for a\n' + 'kernel that was launched via either :py:obj:`~.cuLaunchCooperativeKernel`\n' + 'or :py:obj:`~.cuLaunchCooperativeKernelMultiDevice` exceeds the maximum\n' + 'number of blocks as allowed by\n' + ':py:obj:`~.cuOccupancyMaxActiveBlocksPerMultiprocessor` or\n' + ':py:obj:`~.cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags` times the\n' + 'number of multiprocessors as specified by the device attribute\n' + ':py:obj:`~.CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT`.\n' + ){{endif}} {{if 'CUDA_ERROR_TENSOR_MEMORY_LEAK' in found_values}} - #: An exception occurred on the device while exiting a kernel using - #: tensor memory: the tensor memory was not completely deallocated. - #: This leaves the process in an inconsistent state and any further - #: CUDA work will return the same error. To continue using CUDA, the - #: process must be terminated and relaunched. - CUDA_ERROR_TENSOR_MEMORY_LEAK = cydriver.cudaError_enum.CUDA_ERROR_TENSOR_MEMORY_LEAK{{endif}} + CUDA_ERROR_TENSOR_MEMORY_LEAK = ( + cydriver.cudaError_enum.CUDA_ERROR_TENSOR_MEMORY_LEAK, + 'An exception occurred on the device while exiting a kernel using tensor\n' + 'memory: the tensor memory was not completely deallocated. This leaves the\n' + 'process in an inconsistent state and any further CUDA work will return the\n' + 'same error. To continue using CUDA, the process must be terminated and\n' + 'relaunched.\n' + ){{endif}} {{if 'CUDA_ERROR_NOT_PERMITTED' in found_values}} - #: This error indicates that the attempted operation is not permitted. - CUDA_ERROR_NOT_PERMITTED = cydriver.cudaError_enum.CUDA_ERROR_NOT_PERMITTED{{endif}} + CUDA_ERROR_NOT_PERMITTED = ( + cydriver.cudaError_enum.CUDA_ERROR_NOT_PERMITTED, + 'This error indicates that the attempted operation is not permitted.\n' + ){{endif}} {{if 'CUDA_ERROR_NOT_SUPPORTED' in found_values}} - #: This error indicates that the attempted operation is not supported - #: on the current system or device. - CUDA_ERROR_NOT_SUPPORTED = cydriver.cudaError_enum.CUDA_ERROR_NOT_SUPPORTED{{endif}} + CUDA_ERROR_NOT_SUPPORTED = ( + cydriver.cudaError_enum.CUDA_ERROR_NOT_SUPPORTED, + 'This error indicates that the attempted operation is not supported on the\n' + 'current system or device.\n' + ){{endif}} {{if 'CUDA_ERROR_SYSTEM_NOT_READY' in found_values}} - #: This error indicates that the system is not yet ready to start any - #: CUDA work. To continue using CUDA, verify the system configuration - #: is in a valid state and all required driver daemons are actively - #: running. More information about this error can be found in the - #: system specific user guide. - CUDA_ERROR_SYSTEM_NOT_READY = cydriver.cudaError_enum.CUDA_ERROR_SYSTEM_NOT_READY{{endif}} + CUDA_ERROR_SYSTEM_NOT_READY = ( + cydriver.cudaError_enum.CUDA_ERROR_SYSTEM_NOT_READY, + 'This error indicates that the system is not yet ready to start any CUDA\n' + 'work. To continue using CUDA, verify the system configuration is in a valid\n' + 'state and all required driver daemons are actively running. More\n' + 'information about this error can be found in the system specific user\n' + 'guide.\n' + ){{endif}} {{if 'CUDA_ERROR_SYSTEM_DRIVER_MISMATCH' in found_values}} - #: This error indicates that there is a mismatch between the versions - #: of the display driver and the CUDA driver. Refer to the - #: compatibility documentation for supported versions. - CUDA_ERROR_SYSTEM_DRIVER_MISMATCH = cydriver.cudaError_enum.CUDA_ERROR_SYSTEM_DRIVER_MISMATCH{{endif}} + CUDA_ERROR_SYSTEM_DRIVER_MISMATCH = ( + cydriver.cudaError_enum.CUDA_ERROR_SYSTEM_DRIVER_MISMATCH, + 'This error indicates that there is a mismatch between the versions of the\n' + 'display driver and the CUDA driver. Refer to the compatibility\n' + 'documentation for supported versions.\n' + ){{endif}} {{if 'CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE' in found_values}} - #: This error indicates that the system was upgraded to run with - #: forward compatibility but the visible hardware detected by CUDA does - #: not support this configuration. Refer to the compatibility - #: documentation for the supported hardware matrix or ensure that only - #: supported hardware is visible during initialization via the - #: CUDA_VISIBLE_DEVICES environment variable. - CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE = cydriver.cudaError_enum.CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE{{endif}} + CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE = ( + cydriver.cudaError_enum.CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE, + 'This error indicates that the system was upgraded to run with forward\n' + 'compatibility but the visible hardware detected by CUDA does not support\n' + 'this configuration. Refer to the compatibility documentation for the\n' + 'supported hardware matrix or ensure that only supported hardware is visible\n' + 'during initialization via the CUDA_VISIBLE_DEVICES environment variable.\n' + ){{endif}} {{if 'CUDA_ERROR_MPS_CONNECTION_FAILED' in found_values}} - #: This error indicates that the MPS client failed to connect to the - #: MPS control daemon or the MPS server. - CUDA_ERROR_MPS_CONNECTION_FAILED = cydriver.cudaError_enum.CUDA_ERROR_MPS_CONNECTION_FAILED{{endif}} + CUDA_ERROR_MPS_CONNECTION_FAILED = ( + cydriver.cudaError_enum.CUDA_ERROR_MPS_CONNECTION_FAILED, + 'This error indicates that the MPS client failed to connect to the MPS\n' + 'control daemon or the MPS server.\n' + ){{endif}} {{if 'CUDA_ERROR_MPS_RPC_FAILURE' in found_values}} - #: This error indicates that the remote procedural call between the MPS - #: server and the MPS client failed. - CUDA_ERROR_MPS_RPC_FAILURE = cydriver.cudaError_enum.CUDA_ERROR_MPS_RPC_FAILURE{{endif}} + CUDA_ERROR_MPS_RPC_FAILURE = ( + cydriver.cudaError_enum.CUDA_ERROR_MPS_RPC_FAILURE, + 'This error indicates that the remote procedural call between the MPS server\n' + 'and the MPS client failed.\n' + ){{endif}} {{if 'CUDA_ERROR_MPS_SERVER_NOT_READY' in found_values}} - #: This error indicates that the MPS server is not ready to accept new - #: MPS client requests. This error can be returned when the MPS server - #: is in the process of recovering from a fatal failure. - CUDA_ERROR_MPS_SERVER_NOT_READY = cydriver.cudaError_enum.CUDA_ERROR_MPS_SERVER_NOT_READY{{endif}} + CUDA_ERROR_MPS_SERVER_NOT_READY = ( + cydriver.cudaError_enum.CUDA_ERROR_MPS_SERVER_NOT_READY, + 'This error indicates that the MPS server is not ready to accept new MPS\n' + 'client requests. This error can be returned when the MPS server is in the\n' + 'process of recovering from a fatal failure.\n' + ){{endif}} {{if 'CUDA_ERROR_MPS_MAX_CLIENTS_REACHED' in found_values}} - #: This error indicates that the hardware resources required to create - #: MPS client have been exhausted. - CUDA_ERROR_MPS_MAX_CLIENTS_REACHED = cydriver.cudaError_enum.CUDA_ERROR_MPS_MAX_CLIENTS_REACHED{{endif}} + CUDA_ERROR_MPS_MAX_CLIENTS_REACHED = ( + cydriver.cudaError_enum.CUDA_ERROR_MPS_MAX_CLIENTS_REACHED, + 'This error indicates that the hardware resources required to create MPS\n' + 'client have been exhausted.\n' + ){{endif}} {{if 'CUDA_ERROR_MPS_MAX_CONNECTIONS_REACHED' in found_values}} - #: This error indicates the the hardware resources required to support - #: device connections have been exhausted. - CUDA_ERROR_MPS_MAX_CONNECTIONS_REACHED = cydriver.cudaError_enum.CUDA_ERROR_MPS_MAX_CONNECTIONS_REACHED{{endif}} + CUDA_ERROR_MPS_MAX_CONNECTIONS_REACHED = ( + cydriver.cudaError_enum.CUDA_ERROR_MPS_MAX_CONNECTIONS_REACHED, + 'This error indicates the the hardware resources required to support device\n' + 'connections have been exhausted.\n' + ){{endif}} {{if 'CUDA_ERROR_MPS_CLIENT_TERMINATED' in found_values}} - #: This error indicates that the MPS client has been terminated by the - #: server. To continue using CUDA, the process must be terminated and - #: relaunched. - CUDA_ERROR_MPS_CLIENT_TERMINATED = cydriver.cudaError_enum.CUDA_ERROR_MPS_CLIENT_TERMINATED{{endif}} + CUDA_ERROR_MPS_CLIENT_TERMINATED = ( + cydriver.cudaError_enum.CUDA_ERROR_MPS_CLIENT_TERMINATED, + 'This error indicates that the MPS client has been terminated by the server.\n' + 'To continue using CUDA, the process must be terminated and relaunched.\n' + ){{endif}} {{if 'CUDA_ERROR_CDP_NOT_SUPPORTED' in found_values}} - #: This error indicates that the module is using CUDA Dynamic - #: Parallelism, but the current configuration, like MPS, does not - #: support it. - CUDA_ERROR_CDP_NOT_SUPPORTED = cydriver.cudaError_enum.CUDA_ERROR_CDP_NOT_SUPPORTED{{endif}} + CUDA_ERROR_CDP_NOT_SUPPORTED = ( + cydriver.cudaError_enum.CUDA_ERROR_CDP_NOT_SUPPORTED, + 'This error indicates that the module is using CUDA Dynamic Parallelism, but\n' + 'the current configuration, like MPS, does not support it.\n' + ){{endif}} {{if 'CUDA_ERROR_CDP_VERSION_MISMATCH' in found_values}} - #: This error indicates that a module contains an unsupported - #: interaction between different versions of CUDA Dynamic Parallelism. - CUDA_ERROR_CDP_VERSION_MISMATCH = cydriver.cudaError_enum.CUDA_ERROR_CDP_VERSION_MISMATCH{{endif}} + CUDA_ERROR_CDP_VERSION_MISMATCH = ( + cydriver.cudaError_enum.CUDA_ERROR_CDP_VERSION_MISMATCH, + 'This error indicates that a module contains an unsupported interaction\n' + 'between different versions of CUDA Dynamic Parallelism.\n' + ){{endif}} {{if 'CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED' in found_values}} - #: This error indicates that the operation is not permitted when the - #: stream is capturing. - CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED = cydriver.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED{{endif}} + CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED = ( + cydriver.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED, + 'This error indicates that the operation is not permitted when the stream is\n' + 'capturing.\n' + ){{endif}} {{if 'CUDA_ERROR_STREAM_CAPTURE_INVALIDATED' in found_values}} - #: This error indicates that the current capture sequence on the stream - #: has been invalidated due to a previous error. - CUDA_ERROR_STREAM_CAPTURE_INVALIDATED = cydriver.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_INVALIDATED{{endif}} + CUDA_ERROR_STREAM_CAPTURE_INVALIDATED = ( + cydriver.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_INVALIDATED, + 'This error indicates that the current capture sequence on the stream has\n' + 'been invalidated due to a previous error.\n' + ){{endif}} {{if 'CUDA_ERROR_STREAM_CAPTURE_MERGE' in found_values}} - #: This error indicates that the operation would have resulted in a - #: merge of two independent capture sequences. - CUDA_ERROR_STREAM_CAPTURE_MERGE = cydriver.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_MERGE{{endif}} + CUDA_ERROR_STREAM_CAPTURE_MERGE = ( + cydriver.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_MERGE, + 'This error indicates that the operation would have resulted in a merge of\n' + 'two independent capture sequences.\n' + ){{endif}} {{if 'CUDA_ERROR_STREAM_CAPTURE_UNMATCHED' in found_values}} - #: This error indicates that the capture was not initiated in this - #: stream. - CUDA_ERROR_STREAM_CAPTURE_UNMATCHED = cydriver.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_UNMATCHED{{endif}} + CUDA_ERROR_STREAM_CAPTURE_UNMATCHED = ( + cydriver.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_UNMATCHED, + 'This error indicates that the capture was not initiated in this stream.\n' + ){{endif}} {{if 'CUDA_ERROR_STREAM_CAPTURE_UNJOINED' in found_values}} - #: This error indicates that the capture sequence contains a fork that - #: was not joined to the primary stream. - CUDA_ERROR_STREAM_CAPTURE_UNJOINED = cydriver.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_UNJOINED{{endif}} + CUDA_ERROR_STREAM_CAPTURE_UNJOINED = ( + cydriver.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_UNJOINED, + 'This error indicates that the capture sequence contains a fork that was not\n' + 'joined to the primary stream.\n' + ){{endif}} {{if 'CUDA_ERROR_STREAM_CAPTURE_ISOLATION' in found_values}} - #: This error indicates that a dependency would have been created which - #: crosses the capture sequence boundary. Only implicit in-stream - #: ordering dependencies are allowed to cross the boundary. - CUDA_ERROR_STREAM_CAPTURE_ISOLATION = cydriver.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_ISOLATION{{endif}} + CUDA_ERROR_STREAM_CAPTURE_ISOLATION = ( + cydriver.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_ISOLATION, + 'This error indicates that a dependency would have been created which\n' + 'crosses the capture sequence boundary. Only implicit in-stream ordering\n' + 'dependencies are allowed to cross the boundary.\n' + ){{endif}} {{if 'CUDA_ERROR_STREAM_CAPTURE_IMPLICIT' in found_values}} - #: This error indicates a disallowed implicit dependency on a current - #: capture sequence from cudaStreamLegacy. - CUDA_ERROR_STREAM_CAPTURE_IMPLICIT = cydriver.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_IMPLICIT{{endif}} + CUDA_ERROR_STREAM_CAPTURE_IMPLICIT = ( + cydriver.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_IMPLICIT, + 'This error indicates a disallowed implicit dependency on a current capture\n' + 'sequence from cudaStreamLegacy.\n' + ){{endif}} {{if 'CUDA_ERROR_CAPTURED_EVENT' in found_values}} - #: This error indicates that the operation is not permitted on an event - #: which was last recorded in a capturing stream. - CUDA_ERROR_CAPTURED_EVENT = cydriver.cudaError_enum.CUDA_ERROR_CAPTURED_EVENT{{endif}} + CUDA_ERROR_CAPTURED_EVENT = ( + cydriver.cudaError_enum.CUDA_ERROR_CAPTURED_EVENT, + 'This error indicates that the operation is not permitted on an event which\n' + 'was last recorded in a capturing stream.\n' + ){{endif}} {{if 'CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD' in found_values}} - #: A stream capture sequence not initiated with the - #: :py:obj:`~.CU_STREAM_CAPTURE_MODE_RELAXED` argument to - #: :py:obj:`~.cuStreamBeginCapture` was passed to - #: :py:obj:`~.cuStreamEndCapture` in a different thread. - CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD = cydriver.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD{{endif}} + CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD = ( + cydriver.cudaError_enum.CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD, + 'A stream capture sequence not initiated with the\n' + ':py:obj:`~.CU_STREAM_CAPTURE_MODE_RELAXED` argument to\n' + ':py:obj:`~.cuStreamBeginCapture` was passed to\n' + ':py:obj:`~.cuStreamEndCapture` in a different thread.\n' + ){{endif}} {{if 'CUDA_ERROR_TIMEOUT' in found_values}} - #: This error indicates that the timeout specified for the wait - #: operation has lapsed. - CUDA_ERROR_TIMEOUT = cydriver.cudaError_enum.CUDA_ERROR_TIMEOUT{{endif}} + CUDA_ERROR_TIMEOUT = ( + cydriver.cudaError_enum.CUDA_ERROR_TIMEOUT, + 'This error indicates that the timeout specified for the wait operation has\n' + 'lapsed.\n' + ){{endif}} {{if 'CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE' in found_values}} - #: This error indicates that the graph update was not performed because - #: it included changes which violated constraints specific to - #: instantiated graph update. - CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE = cydriver.cudaError_enum.CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE{{endif}} + CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE = ( + cydriver.cudaError_enum.CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE, + 'This error indicates that the graph update was not performed because it\n' + 'included changes which violated constraints specific to instantiated graph\n' + 'update.\n' + ){{endif}} {{if 'CUDA_ERROR_EXTERNAL_DEVICE' in found_values}} - #: This indicates that an async error has occurred in a device outside - #: of CUDA. If CUDA was waiting for an external device's signal before - #: consuming shared data, the external device signaled an error - #: indicating that the data is not valid for consumption. This leaves - #: the process in an inconsistent state and any further CUDA work will - #: return the same error. To continue using CUDA, the process must be - #: terminated and relaunched. - CUDA_ERROR_EXTERNAL_DEVICE = cydriver.cudaError_enum.CUDA_ERROR_EXTERNAL_DEVICE{{endif}} + CUDA_ERROR_EXTERNAL_DEVICE = ( + cydriver.cudaError_enum.CUDA_ERROR_EXTERNAL_DEVICE, + 'This indicates that an async error has occurred in a device outside of\n' + "CUDA. If CUDA was waiting for an external device's signal before consuming\n" + 'shared data, the external device signaled an error indicating that the data\n' + 'is not valid for consumption. This leaves the process in an inconsistent\n' + 'state and any further CUDA work will return the same error. To continue\n' + 'using CUDA, the process must be terminated and relaunched.\n' + ){{endif}} {{if 'CUDA_ERROR_INVALID_CLUSTER_SIZE' in found_values}} - #: Indicates a kernel launch error due to cluster misconfiguration. - CUDA_ERROR_INVALID_CLUSTER_SIZE = cydriver.cudaError_enum.CUDA_ERROR_INVALID_CLUSTER_SIZE{{endif}} + CUDA_ERROR_INVALID_CLUSTER_SIZE = ( + cydriver.cudaError_enum.CUDA_ERROR_INVALID_CLUSTER_SIZE, + 'Indicates a kernel launch error due to cluster misconfiguration.\n' + ){{endif}} {{if 'CUDA_ERROR_FUNCTION_NOT_LOADED' in found_values}} - #: Indiciates a function handle is not loaded when calling an API that - #: requires a loaded function. - CUDA_ERROR_FUNCTION_NOT_LOADED = cydriver.cudaError_enum.CUDA_ERROR_FUNCTION_NOT_LOADED{{endif}} + CUDA_ERROR_FUNCTION_NOT_LOADED = ( + cydriver.cudaError_enum.CUDA_ERROR_FUNCTION_NOT_LOADED, + 'Indiciates a function handle is not loaded when calling an API that\n' + 'requires a loaded function.\n' + ){{endif}} {{if 'CUDA_ERROR_INVALID_RESOURCE_TYPE' in found_values}} - #: This error indicates one or more resources passed in are not valid - #: resource types for the operation. - CUDA_ERROR_INVALID_RESOURCE_TYPE = cydriver.cudaError_enum.CUDA_ERROR_INVALID_RESOURCE_TYPE{{endif}} + CUDA_ERROR_INVALID_RESOURCE_TYPE = ( + cydriver.cudaError_enum.CUDA_ERROR_INVALID_RESOURCE_TYPE, + 'This error indicates one or more resources passed in are not valid resource\n' + 'types for the operation.\n' + ){{endif}} {{if 'CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION' in found_values}} - #: This error indicates one or more resources are insufficient or non- - #: applicable for the operation. - CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION = cydriver.cudaError_enum.CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION{{endif}} + CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION = ( + cydriver.cudaError_enum.CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION, + 'This error indicates one or more resources are insufficient or non-\n' + 'applicable for the operation.\n' + ){{endif}} {{if 'CUDA_ERROR_KEY_ROTATION' in found_values}} - #: This error indicates that an error happened during the key rotation - #: sequence. - CUDA_ERROR_KEY_ROTATION = cydriver.cudaError_enum.CUDA_ERROR_KEY_ROTATION{{endif}} + CUDA_ERROR_KEY_ROTATION = ( + cydriver.cudaError_enum.CUDA_ERROR_KEY_ROTATION, + 'This error indicates that an error happened during the key rotation\n' + 'sequence.\n' + ){{endif}} {{if 'CUDA_ERROR_STREAM_DETACHED' in found_values}} - #: This error indicates that the requested operation is not permitted - #: because the stream is in a detached state. This can occur if the - #: green context associated with the stream has been destroyed, - #: limiting the stream's operational capabilities. - CUDA_ERROR_STREAM_DETACHED = cydriver.cudaError_enum.CUDA_ERROR_STREAM_DETACHED{{endif}} + CUDA_ERROR_STREAM_DETACHED = ( + cydriver.cudaError_enum.CUDA_ERROR_STREAM_DETACHED, + 'This error indicates that the requested operation is not permitted because\n' + 'the stream is in a detached state. This can occur if the green context\n' + "associated with the stream has been destroyed, limiting the stream's\n" + 'operational capabilities.\n' + ){{endif}} {{if 'CUDA_ERROR_UNKNOWN' in found_values}} - #: This indicates that an unknown internal error has occurred. - CUDA_ERROR_UNKNOWN = cydriver.cudaError_enum.CUDA_ERROR_UNKNOWN{{endif}} + CUDA_ERROR_UNKNOWN = ( + cydriver.cudaError_enum.CUDA_ERROR_UNKNOWN, + 'This indicates that an unknown internal error has occurred.\n' + ){{endif}} -_dict_CUresult = dict(((int(v), v) for k, v in CUresult.__members__.items())) {{endif}} {{if 'CUdevice_P2PAttribute_enum' in found_types}} -class CUdevice_P2PAttribute(IntEnum): +class CUdevice_P2PAttribute(_FastEnum): """ P2P Attributes """ {{if 'CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK' in found_values}} - #: A relative value indicating the performance of the link between two - #: devices - CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK = cydriver.CUdevice_P2PAttribute_enum.CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK{{endif}} + CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK = ( + cydriver.CUdevice_P2PAttribute_enum.CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK, + 'A relative value indicating the performance of the link between two devices\n' + ){{endif}} {{if 'CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED' in found_values}} - #: P2P Access is enable - CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED = cydriver.CUdevice_P2PAttribute_enum.CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED{{endif}} + CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED = ( + cydriver.CUdevice_P2PAttribute_enum.CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED, + 'P2P Access is enable\n' + ){{endif}} {{if 'CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED' in found_values}} - #: All CUDA-valid atomic operation over the link are supported - CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED = cydriver.CUdevice_P2PAttribute_enum.CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED{{endif}} + CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED = ( + cydriver.CUdevice_P2PAttribute_enum.CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED, + 'All CUDA-valid atomic operation over the link are supported\n' + ){{endif}} {{if 'CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED' in found_values}} - #: [Deprecated] - CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED = cydriver.CUdevice_P2PAttribute_enum.CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED{{endif}} + CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED = ( + cydriver.CUdevice_P2PAttribute_enum.CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED, + '[Deprecated]\n' + ){{endif}} {{if 'CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED' in found_values}} - #: Accessing CUDA arrays over the link supported - CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED = cydriver.CUdevice_P2PAttribute_enum.CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED{{endif}} + CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED = ( + cydriver.CUdevice_P2PAttribute_enum.CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED, + 'Accessing CUDA arrays over the link supported\n' + ){{endif}} {{if 'CU_DEVICE_P2P_ATTRIBUTE_ONLY_PARTIAL_NATIVE_ATOMIC_SUPPORTED' in found_values}} - #: Only some CUDA-valid atomic operations over the link are supported. - CU_DEVICE_P2P_ATTRIBUTE_ONLY_PARTIAL_NATIVE_ATOMIC_SUPPORTED = cydriver.CUdevice_P2PAttribute_enum.CU_DEVICE_P2P_ATTRIBUTE_ONLY_PARTIAL_NATIVE_ATOMIC_SUPPORTED{{endif}} + CU_DEVICE_P2P_ATTRIBUTE_ONLY_PARTIAL_NATIVE_ATOMIC_SUPPORTED = ( + cydriver.CUdevice_P2PAttribute_enum.CU_DEVICE_P2P_ATTRIBUTE_ONLY_PARTIAL_NATIVE_ATOMIC_SUPPORTED, + 'Only some CUDA-valid atomic operations over the link are supported.\n' + ){{endif}} -_dict_CUdevice_P2PAttribute = dict(((int(v), v) for k, v in CUdevice_P2PAttribute.__members__.items())) {{endif}} {{if 'CUresourceViewFormat_enum' in found_types}} -class CUresourceViewFormat(IntEnum): +class CUresourceViewFormat(_FastEnum): """ Resource view format """ {{if 'CU_RES_VIEW_FORMAT_NONE' in found_values}} - #: No resource view format (use underlying resource format) - CU_RES_VIEW_FORMAT_NONE = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_NONE{{endif}} + CU_RES_VIEW_FORMAT_NONE = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_NONE, + 'No resource view format (use underlying resource format)\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_UINT_1X8' in found_values}} - #: 1 channel unsigned 8-bit integers - CU_RES_VIEW_FORMAT_UINT_1X8 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_1X8{{endif}} + CU_RES_VIEW_FORMAT_UINT_1X8 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_1X8, + '1 channel unsigned 8-bit integers\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_UINT_2X8' in found_values}} - #: 2 channel unsigned 8-bit integers - CU_RES_VIEW_FORMAT_UINT_2X8 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_2X8{{endif}} + CU_RES_VIEW_FORMAT_UINT_2X8 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_2X8, + '2 channel unsigned 8-bit integers\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_UINT_4X8' in found_values}} - #: 4 channel unsigned 8-bit integers - CU_RES_VIEW_FORMAT_UINT_4X8 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_4X8{{endif}} + CU_RES_VIEW_FORMAT_UINT_4X8 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_4X8, + '4 channel unsigned 8-bit integers\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_SINT_1X8' in found_values}} - #: 1 channel signed 8-bit integers - CU_RES_VIEW_FORMAT_SINT_1X8 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_1X8{{endif}} + CU_RES_VIEW_FORMAT_SINT_1X8 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_1X8, + '1 channel signed 8-bit integers\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_SINT_2X8' in found_values}} - #: 2 channel signed 8-bit integers - CU_RES_VIEW_FORMAT_SINT_2X8 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_2X8{{endif}} + CU_RES_VIEW_FORMAT_SINT_2X8 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_2X8, + '2 channel signed 8-bit integers\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_SINT_4X8' in found_values}} - #: 4 channel signed 8-bit integers - CU_RES_VIEW_FORMAT_SINT_4X8 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_4X8{{endif}} + CU_RES_VIEW_FORMAT_SINT_4X8 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_4X8, + '4 channel signed 8-bit integers\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_UINT_1X16' in found_values}} - #: 1 channel unsigned 16-bit integers - CU_RES_VIEW_FORMAT_UINT_1X16 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_1X16{{endif}} + CU_RES_VIEW_FORMAT_UINT_1X16 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_1X16, + '1 channel unsigned 16-bit integers\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_UINT_2X16' in found_values}} - #: 2 channel unsigned 16-bit integers - CU_RES_VIEW_FORMAT_UINT_2X16 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_2X16{{endif}} + CU_RES_VIEW_FORMAT_UINT_2X16 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_2X16, + '2 channel unsigned 16-bit integers\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_UINT_4X16' in found_values}} - #: 4 channel unsigned 16-bit integers - CU_RES_VIEW_FORMAT_UINT_4X16 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_4X16{{endif}} + CU_RES_VIEW_FORMAT_UINT_4X16 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_4X16, + '4 channel unsigned 16-bit integers\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_SINT_1X16' in found_values}} - #: 1 channel signed 16-bit integers - CU_RES_VIEW_FORMAT_SINT_1X16 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_1X16{{endif}} + CU_RES_VIEW_FORMAT_SINT_1X16 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_1X16, + '1 channel signed 16-bit integers\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_SINT_2X16' in found_values}} - #: 2 channel signed 16-bit integers - CU_RES_VIEW_FORMAT_SINT_2X16 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_2X16{{endif}} + CU_RES_VIEW_FORMAT_SINT_2X16 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_2X16, + '2 channel signed 16-bit integers\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_SINT_4X16' in found_values}} - #: 4 channel signed 16-bit integers - CU_RES_VIEW_FORMAT_SINT_4X16 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_4X16{{endif}} + CU_RES_VIEW_FORMAT_SINT_4X16 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_4X16, + '4 channel signed 16-bit integers\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_UINT_1X32' in found_values}} - #: 1 channel unsigned 32-bit integers - CU_RES_VIEW_FORMAT_UINT_1X32 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_1X32{{endif}} + CU_RES_VIEW_FORMAT_UINT_1X32 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_1X32, + '1 channel unsigned 32-bit integers\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_UINT_2X32' in found_values}} - #: 2 channel unsigned 32-bit integers - CU_RES_VIEW_FORMAT_UINT_2X32 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_2X32{{endif}} + CU_RES_VIEW_FORMAT_UINT_2X32 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_2X32, + '2 channel unsigned 32-bit integers\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_UINT_4X32' in found_values}} - #: 4 channel unsigned 32-bit integers - CU_RES_VIEW_FORMAT_UINT_4X32 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_4X32{{endif}} + CU_RES_VIEW_FORMAT_UINT_4X32 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UINT_4X32, + '4 channel unsigned 32-bit integers\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_SINT_1X32' in found_values}} - #: 1 channel signed 32-bit integers - CU_RES_VIEW_FORMAT_SINT_1X32 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_1X32{{endif}} + CU_RES_VIEW_FORMAT_SINT_1X32 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_1X32, + '1 channel signed 32-bit integers\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_SINT_2X32' in found_values}} - #: 2 channel signed 32-bit integers - CU_RES_VIEW_FORMAT_SINT_2X32 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_2X32{{endif}} + CU_RES_VIEW_FORMAT_SINT_2X32 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_2X32, + '2 channel signed 32-bit integers\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_SINT_4X32' in found_values}} - #: 4 channel signed 32-bit integers - CU_RES_VIEW_FORMAT_SINT_4X32 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_4X32{{endif}} + CU_RES_VIEW_FORMAT_SINT_4X32 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SINT_4X32, + '4 channel signed 32-bit integers\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_FLOAT_1X16' in found_values}} - #: 1 channel 16-bit floating point - CU_RES_VIEW_FORMAT_FLOAT_1X16 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_FLOAT_1X16{{endif}} + CU_RES_VIEW_FORMAT_FLOAT_1X16 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_FLOAT_1X16, + '1 channel 16-bit floating point\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_FLOAT_2X16' in found_values}} - #: 2 channel 16-bit floating point - CU_RES_VIEW_FORMAT_FLOAT_2X16 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_FLOAT_2X16{{endif}} + CU_RES_VIEW_FORMAT_FLOAT_2X16 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_FLOAT_2X16, + '2 channel 16-bit floating point\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_FLOAT_4X16' in found_values}} - #: 4 channel 16-bit floating point - CU_RES_VIEW_FORMAT_FLOAT_4X16 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_FLOAT_4X16{{endif}} + CU_RES_VIEW_FORMAT_FLOAT_4X16 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_FLOAT_4X16, + '4 channel 16-bit floating point\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_FLOAT_1X32' in found_values}} - #: 1 channel 32-bit floating point - CU_RES_VIEW_FORMAT_FLOAT_1X32 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_FLOAT_1X32{{endif}} + CU_RES_VIEW_FORMAT_FLOAT_1X32 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_FLOAT_1X32, + '1 channel 32-bit floating point\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_FLOAT_2X32' in found_values}} - #: 2 channel 32-bit floating point - CU_RES_VIEW_FORMAT_FLOAT_2X32 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_FLOAT_2X32{{endif}} + CU_RES_VIEW_FORMAT_FLOAT_2X32 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_FLOAT_2X32, + '2 channel 32-bit floating point\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_FLOAT_4X32' in found_values}} - #: 4 channel 32-bit floating point - CU_RES_VIEW_FORMAT_FLOAT_4X32 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_FLOAT_4X32{{endif}} + CU_RES_VIEW_FORMAT_FLOAT_4X32 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_FLOAT_4X32, + '4 channel 32-bit floating point\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_UNSIGNED_BC1' in found_values}} - #: Block compressed 1 - CU_RES_VIEW_FORMAT_UNSIGNED_BC1 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC1{{endif}} + CU_RES_VIEW_FORMAT_UNSIGNED_BC1 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC1, + 'Block compressed 1\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_UNSIGNED_BC2' in found_values}} - #: Block compressed 2 - CU_RES_VIEW_FORMAT_UNSIGNED_BC2 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC2{{endif}} + CU_RES_VIEW_FORMAT_UNSIGNED_BC2 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC2, + 'Block compressed 2\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_UNSIGNED_BC3' in found_values}} - #: Block compressed 3 - CU_RES_VIEW_FORMAT_UNSIGNED_BC3 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC3{{endif}} + CU_RES_VIEW_FORMAT_UNSIGNED_BC3 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC3, + 'Block compressed 3\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_UNSIGNED_BC4' in found_values}} - #: Block compressed 4 unsigned - CU_RES_VIEW_FORMAT_UNSIGNED_BC4 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC4{{endif}} + CU_RES_VIEW_FORMAT_UNSIGNED_BC4 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC4, + 'Block compressed 4 unsigned\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_SIGNED_BC4' in found_values}} - #: Block compressed 4 signed - CU_RES_VIEW_FORMAT_SIGNED_BC4 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SIGNED_BC4{{endif}} + CU_RES_VIEW_FORMAT_SIGNED_BC4 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SIGNED_BC4, + 'Block compressed 4 signed\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_UNSIGNED_BC5' in found_values}} - #: Block compressed 5 unsigned - CU_RES_VIEW_FORMAT_UNSIGNED_BC5 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC5{{endif}} + CU_RES_VIEW_FORMAT_UNSIGNED_BC5 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC5, + 'Block compressed 5 unsigned\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_SIGNED_BC5' in found_values}} - #: Block compressed 5 signed - CU_RES_VIEW_FORMAT_SIGNED_BC5 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SIGNED_BC5{{endif}} + CU_RES_VIEW_FORMAT_SIGNED_BC5 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SIGNED_BC5, + 'Block compressed 5 signed\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_UNSIGNED_BC6H' in found_values}} - #: Block compressed 6 unsigned half-float - CU_RES_VIEW_FORMAT_UNSIGNED_BC6H = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC6H{{endif}} + CU_RES_VIEW_FORMAT_UNSIGNED_BC6H = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC6H, + 'Block compressed 6 unsigned half-float\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_SIGNED_BC6H' in found_values}} - #: Block compressed 6 signed half-float - CU_RES_VIEW_FORMAT_SIGNED_BC6H = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SIGNED_BC6H{{endif}} + CU_RES_VIEW_FORMAT_SIGNED_BC6H = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_SIGNED_BC6H, + 'Block compressed 6 signed half-float\n' + ){{endif}} {{if 'CU_RES_VIEW_FORMAT_UNSIGNED_BC7' in found_values}} - #: Block compressed 7 - CU_RES_VIEW_FORMAT_UNSIGNED_BC7 = cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC7{{endif}} + CU_RES_VIEW_FORMAT_UNSIGNED_BC7 = ( + cydriver.CUresourceViewFormat_enum.CU_RES_VIEW_FORMAT_UNSIGNED_BC7, + 'Block compressed 7\n' + ){{endif}} -_dict_CUresourceViewFormat = dict(((int(v), v) for k, v in CUresourceViewFormat.__members__.items())) {{endif}} {{if 'CUtensorMapDataType_enum' in found_types}} -class CUtensorMapDataType(IntEnum): +class CUtensorMapDataType(_FastEnum): """ Tensor map data type """ @@ -4437,11 +5578,10 @@ class CUtensorMapDataType(IntEnum): {{if 'CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B' in found_values}} CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B = cydriver.CUtensorMapDataType_enum.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B{{endif}} -_dict_CUtensorMapDataType = dict(((int(v), v) for k, v in CUtensorMapDataType.__members__.items())) {{endif}} {{if 'CUtensorMapInterleave_enum' in found_types}} -class CUtensorMapInterleave(IntEnum): +class CUtensorMapInterleave(_FastEnum): """ Tensor map interleave layout type """ @@ -4452,11 +5592,10 @@ class CUtensorMapInterleave(IntEnum): {{if 'CU_TENSOR_MAP_INTERLEAVE_32B' in found_values}} CU_TENSOR_MAP_INTERLEAVE_32B = cydriver.CUtensorMapInterleave_enum.CU_TENSOR_MAP_INTERLEAVE_32B{{endif}} -_dict_CUtensorMapInterleave = dict(((int(v), v) for k, v in CUtensorMapInterleave.__members__.items())) {{endif}} {{if 'CUtensorMapSwizzle_enum' in found_types}} -class CUtensorMapSwizzle(IntEnum): +class CUtensorMapSwizzle(_FastEnum): """ Tensor map swizzling mode of shared memory banks """ @@ -4475,11 +5614,10 @@ class CUtensorMapSwizzle(IntEnum): {{if 'CU_TENSOR_MAP_SWIZZLE_128B_ATOM_64B' in found_values}} CU_TENSOR_MAP_SWIZZLE_128B_ATOM_64B = cydriver.CUtensorMapSwizzle_enum.CU_TENSOR_MAP_SWIZZLE_128B_ATOM_64B{{endif}} -_dict_CUtensorMapSwizzle = dict(((int(v), v) for k, v in CUtensorMapSwizzle.__members__.items())) {{endif}} {{if 'CUtensorMapL2promotion_enum' in found_types}} -class CUtensorMapL2promotion(IntEnum): +class CUtensorMapL2promotion(_FastEnum): """ Tensor map L2 promotion type """ @@ -4492,11 +5630,10 @@ class CUtensorMapL2promotion(IntEnum): {{if 'CU_TENSOR_MAP_L2_PROMOTION_L2_256B' in found_values}} CU_TENSOR_MAP_L2_PROMOTION_L2_256B = cydriver.CUtensorMapL2promotion_enum.CU_TENSOR_MAP_L2_PROMOTION_L2_256B{{endif}} -_dict_CUtensorMapL2promotion = dict(((int(v), v) for k, v in CUtensorMapL2promotion.__members__.items())) {{endif}} {{if 'CUtensorMapFloatOOBfill_enum' in found_types}} -class CUtensorMapFloatOOBfill(IntEnum): +class CUtensorMapFloatOOBfill(_FastEnum): """ Tensor map out-of-bounds fill type """ @@ -4505,11 +5642,10 @@ class CUtensorMapFloatOOBfill(IntEnum): {{if 'CU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA' in found_values}} CU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA = cydriver.CUtensorMapFloatOOBfill_enum.CU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA{{endif}} -_dict_CUtensorMapFloatOOBfill = dict(((int(v), v) for k, v in CUtensorMapFloatOOBfill.__members__.items())) {{endif}} {{if 'CUtensorMapIm2ColWideMode_enum' in found_types}} -class CUtensorMapIm2ColWideMode(IntEnum): +class CUtensorMapIm2ColWideMode(_FastEnum): """ Tensor map Im2Col wide mode """ @@ -4518,188 +5654,238 @@ class CUtensorMapIm2ColWideMode(IntEnum): {{if 'CU_TENSOR_MAP_IM2COL_WIDE_MODE_W128' in found_values}} CU_TENSOR_MAP_IM2COL_WIDE_MODE_W128 = cydriver.CUtensorMapIm2ColWideMode_enum.CU_TENSOR_MAP_IM2COL_WIDE_MODE_W128{{endif}} -_dict_CUtensorMapIm2ColWideMode = dict(((int(v), v) for k, v in CUtensorMapIm2ColWideMode.__members__.items())) {{endif}} {{if 'CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum' in found_types}} -class CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS(IntEnum): +class CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS(_FastEnum): """ Access flags that specify the level of access the current context's device has on the memory referenced. """ {{if 'CU_POINTER_ATTRIBUTE_ACCESS_FLAG_NONE' in found_values}} - #: No access, meaning the device cannot access this memory at all, thus - #: must be staged through accessible memory in order to complete - #: certain operations - CU_POINTER_ATTRIBUTE_ACCESS_FLAG_NONE = cydriver.CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAG_NONE{{endif}} + CU_POINTER_ATTRIBUTE_ACCESS_FLAG_NONE = ( + cydriver.CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAG_NONE, + 'No access, meaning the device cannot access this memory at all, thus must\n' + 'be staged through accessible memory in order to complete certain operations\n' + ){{endif}} {{if 'CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READ' in found_values}} - #: Read-only access, meaning writes to this memory are considered - #: invalid accesses and thus return error in that case. - CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READ = cydriver.CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READ{{endif}} + CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READ = ( + cydriver.CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READ, + 'Read-only access, meaning writes to this memory are considered invalid\n' + 'accesses and thus return error in that case.\n' + ){{endif}} {{if 'CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE' in found_values}} - #: Read-write access, the device has full read-write access to the - #: memory - CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE = cydriver.CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE{{endif}} + CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE = ( + cydriver.CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum.CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE, + 'Read-write access, the device has full read-write access to the memory\n' + ){{endif}} -_dict_CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS = dict(((int(v), v) for k, v in CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS.__members__.items())) {{endif}} {{if 'CUexternalMemoryHandleType_enum' in found_types}} -class CUexternalMemoryHandleType(IntEnum): +class CUexternalMemoryHandleType(_FastEnum): """ External memory handle types """ {{if 'CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD' in found_values}} - #: Handle is an opaque file descriptor - CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD = cydriver.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD{{endif}} + CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD = ( + cydriver.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD, + 'Handle is an opaque file descriptor\n' + ){{endif}} {{if 'CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32' in found_values}} - #: Handle is an opaque shared NT handle - CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32 = cydriver.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32{{endif}} + CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32 = ( + cydriver.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32, + 'Handle is an opaque shared NT handle\n' + ){{endif}} {{if 'CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT' in found_values}} - #: Handle is an opaque, globally shared handle - CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT = cydriver.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT{{endif}} + CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT = ( + cydriver.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT, + 'Handle is an opaque, globally shared handle\n' + ){{endif}} {{if 'CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP' in found_values}} - #: Handle is a D3D12 heap object - CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP = cydriver.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP{{endif}} + CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP = ( + cydriver.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP, + 'Handle is a D3D12 heap object\n' + ){{endif}} {{if 'CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE' in found_values}} - #: Handle is a D3D12 committed resource - CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE = cydriver.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE{{endif}} + CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE = ( + cydriver.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE, + 'Handle is a D3D12 committed resource\n' + ){{endif}} {{if 'CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE' in found_values}} - #: Handle is a shared NT handle to a D3D11 resource - CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE = cydriver.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE{{endif}} + CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE = ( + cydriver.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE, + 'Handle is a shared NT handle to a D3D11 resource\n' + ){{endif}} {{if 'CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT' in found_values}} - #: Handle is a globally shared handle to a D3D11 resource - CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT = cydriver.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT{{endif}} + CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT = ( + cydriver.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT, + 'Handle is a globally shared handle to a D3D11 resource\n' + ){{endif}} {{if 'CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF' in found_values}} - #: Handle is an NvSciBuf object - CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF = cydriver.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF{{endif}} + CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF = ( + cydriver.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF, + 'Handle is an NvSciBuf object\n' + ){{endif}} {{if 'CU_EXTERNAL_MEMORY_HANDLE_TYPE_DMABUF_FD' in found_values}} - #: Handle is a dma_buf file descriptor - CU_EXTERNAL_MEMORY_HANDLE_TYPE_DMABUF_FD = cydriver.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_DMABUF_FD{{endif}} + CU_EXTERNAL_MEMORY_HANDLE_TYPE_DMABUF_FD = ( + cydriver.CUexternalMemoryHandleType_enum.CU_EXTERNAL_MEMORY_HANDLE_TYPE_DMABUF_FD, + 'Handle is a dma_buf file descriptor\n' + ){{endif}} -_dict_CUexternalMemoryHandleType = dict(((int(v), v) for k, v in CUexternalMemoryHandleType.__members__.items())) {{endif}} {{if 'CUexternalSemaphoreHandleType_enum' in found_types}} -class CUexternalSemaphoreHandleType(IntEnum): +class CUexternalSemaphoreHandleType(_FastEnum): """ External semaphore handle types """ {{if 'CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD' in found_values}} - #: Handle is an opaque file descriptor - CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD = cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD{{endif}} + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD = ( + cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD, + 'Handle is an opaque file descriptor\n' + ){{endif}} {{if 'CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32' in found_values}} - #: Handle is an opaque shared NT handle - CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32 = cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32{{endif}} + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32 = ( + cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32, + 'Handle is an opaque shared NT handle\n' + ){{endif}} {{if 'CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT' in found_values}} - #: Handle is an opaque, globally shared handle - CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT = cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT{{endif}} + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT = ( + cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT, + 'Handle is an opaque, globally shared handle\n' + ){{endif}} {{if 'CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE' in found_values}} - #: Handle is a shared NT handle referencing a D3D12 fence object - CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE = cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE{{endif}} + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE = ( + cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE, + 'Handle is a shared NT handle referencing a D3D12 fence object\n' + ){{endif}} {{if 'CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE' in found_values}} - #: Handle is a shared NT handle referencing a D3D11 fence object - CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE = cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE{{endif}} + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE = ( + cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE, + 'Handle is a shared NT handle referencing a D3D11 fence object\n' + ){{endif}} {{if 'CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC' in found_values}} - #: Opaque handle to NvSciSync Object - CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC = cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC{{endif}} + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC = ( + cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, + 'Opaque handle to NvSciSync Object\n' + ){{endif}} {{if 'CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX' in found_values}} - #: Handle is a shared NT handle referencing a D3D11 keyed mutex object - CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX = cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX{{endif}} + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX = ( + cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX, + 'Handle is a shared NT handle referencing a D3D11 keyed mutex object\n' + ){{endif}} {{if 'CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT' in found_values}} - #: Handle is a globally shared handle referencing a D3D11 keyed mutex - #: object - CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT = cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT{{endif}} + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT = ( + cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT, + 'Handle is a globally shared handle referencing a D3D11 keyed mutex object\n' + ){{endif}} {{if 'CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD' in found_values}} - #: Handle is an opaque file descriptor referencing a timeline semaphore - CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD = cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD{{endif}} + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD = ( + cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD, + 'Handle is an opaque file descriptor referencing a timeline semaphore\n' + ){{endif}} {{if 'CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32' in found_values}} - #: Handle is an opaque shared NT handle referencing a timeline - #: semaphore - CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32 = cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32{{endif}} + CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32 = ( + cydriver.CUexternalSemaphoreHandleType_enum.CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32, + 'Handle is an opaque shared NT handle referencing a timeline semaphore\n' + ){{endif}} -_dict_CUexternalSemaphoreHandleType = dict(((int(v), v) for k, v in CUexternalSemaphoreHandleType.__members__.items())) {{endif}} {{if 'CUmemAllocationHandleType_enum' in found_types}} -class CUmemAllocationHandleType(IntEnum): +class CUmemAllocationHandleType(_FastEnum): """ Flags for specifying particular handle types """ {{if 'CU_MEM_HANDLE_TYPE_NONE' in found_values}} - #: Does not allow any export mechanism. > - CU_MEM_HANDLE_TYPE_NONE = cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_NONE{{endif}} + CU_MEM_HANDLE_TYPE_NONE = ( + cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_NONE, + 'Does not allow any export mechanism. >\n' + ){{endif}} {{if 'CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR' in found_values}} - #: Allows a file descriptor to be used for exporting. Permitted only on - #: POSIX systems. (int) - CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR = cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR{{endif}} + CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR = ( + cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR, + 'Allows a file descriptor to be used for exporting. Permitted only on POSIX\n' + 'systems. (int)\n' + ){{endif}} {{if 'CU_MEM_HANDLE_TYPE_WIN32' in found_values}} - #: Allows a Win32 NT handle to be used for exporting. (HANDLE) - CU_MEM_HANDLE_TYPE_WIN32 = cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32{{endif}} + CU_MEM_HANDLE_TYPE_WIN32 = ( + cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32, + 'Allows a Win32 NT handle to be used for exporting. (HANDLE)\n' + ){{endif}} {{if 'CU_MEM_HANDLE_TYPE_WIN32_KMT' in found_values}} - #: Allows a Win32 KMT handle to be used for exporting. (D3DKMT_HANDLE) - CU_MEM_HANDLE_TYPE_WIN32_KMT = cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32_KMT{{endif}} + CU_MEM_HANDLE_TYPE_WIN32_KMT = ( + cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_WIN32_KMT, + 'Allows a Win32 KMT handle to be used for exporting. (D3DKMT_HANDLE)\n' + ){{endif}} {{if 'CU_MEM_HANDLE_TYPE_FABRIC' in found_values}} - #: Allows a fabric handle to be used for exporting. (CUmemFabricHandle) - CU_MEM_HANDLE_TYPE_FABRIC = cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_FABRIC{{endif}} + CU_MEM_HANDLE_TYPE_FABRIC = ( + cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_FABRIC, + 'Allows a fabric handle to be used for exporting. (CUmemFabricHandle)\n' + ){{endif}} {{if 'CU_MEM_HANDLE_TYPE_MAX' in found_values}} CU_MEM_HANDLE_TYPE_MAX = cydriver.CUmemAllocationHandleType_enum.CU_MEM_HANDLE_TYPE_MAX{{endif}} -_dict_CUmemAllocationHandleType = dict(((int(v), v) for k, v in CUmemAllocationHandleType.__members__.items())) {{endif}} {{if 'CUmemAccess_flags_enum' in found_types}} -class CUmemAccess_flags(IntEnum): +class CUmemAccess_flags(_FastEnum): """ Specifies the memory protection flags for mapping. """ {{if 'CU_MEM_ACCESS_FLAGS_PROT_NONE' in found_values}} - #: Default, make the address range not accessible - CU_MEM_ACCESS_FLAGS_PROT_NONE = cydriver.CUmemAccess_flags_enum.CU_MEM_ACCESS_FLAGS_PROT_NONE{{endif}} + CU_MEM_ACCESS_FLAGS_PROT_NONE = ( + cydriver.CUmemAccess_flags_enum.CU_MEM_ACCESS_FLAGS_PROT_NONE, + 'Default, make the address range not accessible\n' + ){{endif}} {{if 'CU_MEM_ACCESS_FLAGS_PROT_READ' in found_values}} - #: Make the address range read accessible - CU_MEM_ACCESS_FLAGS_PROT_READ = cydriver.CUmemAccess_flags_enum.CU_MEM_ACCESS_FLAGS_PROT_READ{{endif}} + CU_MEM_ACCESS_FLAGS_PROT_READ = ( + cydriver.CUmemAccess_flags_enum.CU_MEM_ACCESS_FLAGS_PROT_READ, + 'Make the address range read accessible\n' + ){{endif}} {{if 'CU_MEM_ACCESS_FLAGS_PROT_READWRITE' in found_values}} - #: Make the address range read-write accessible - CU_MEM_ACCESS_FLAGS_PROT_READWRITE = cydriver.CUmemAccess_flags_enum.CU_MEM_ACCESS_FLAGS_PROT_READWRITE{{endif}} + CU_MEM_ACCESS_FLAGS_PROT_READWRITE = ( + cydriver.CUmemAccess_flags_enum.CU_MEM_ACCESS_FLAGS_PROT_READWRITE, + 'Make the address range read-write accessible\n' + ){{endif}} {{if 'CU_MEM_ACCESS_FLAGS_PROT_MAX' in found_values}} CU_MEM_ACCESS_FLAGS_PROT_MAX = cydriver.CUmemAccess_flags_enum.CU_MEM_ACCESS_FLAGS_PROT_MAX{{endif}} -_dict_CUmemAccess_flags = dict(((int(v), v) for k, v in CUmemAccess_flags.__members__.items())) {{endif}} {{if 'CUmemLocationType_enum' in found_types}} -class CUmemLocationType(IntEnum): +class CUmemLocationType(_FastEnum): """ Specifies the type of location """ @@ -4707,33 +5893,42 @@ class CUmemLocationType(IntEnum): CU_MEM_LOCATION_TYPE_INVALID = cydriver.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_INVALID{{endif}} {{if 'CU_MEM_LOCATION_TYPE_NONE' in found_values}} - #: Location is unspecified. This is used when creating a managed memory - #: pool to indicate no preferred location for the pool - CU_MEM_LOCATION_TYPE_NONE = cydriver.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_NONE{{endif}} + CU_MEM_LOCATION_TYPE_NONE = ( + cydriver.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_NONE, + 'Location is unspecified. This is used when creating a managed memory pool\n' + 'to indicate no preferred location for the pool\n' + ){{endif}} {{if 'CU_MEM_LOCATION_TYPE_DEVICE' in found_values}} - #: Location is a device location, thus id is a device ordinal - CU_MEM_LOCATION_TYPE_DEVICE = cydriver.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_DEVICE{{endif}} + CU_MEM_LOCATION_TYPE_DEVICE = ( + cydriver.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_DEVICE, + 'Location is a device location, thus id is a device ordinal\n' + ){{endif}} {{if 'CU_MEM_LOCATION_TYPE_HOST' in found_values}} - #: Location is host, id is ignored - CU_MEM_LOCATION_TYPE_HOST = cydriver.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_HOST{{endif}} + CU_MEM_LOCATION_TYPE_HOST = ( + cydriver.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_HOST, + 'Location is host, id is ignored\n' + ){{endif}} {{if 'CU_MEM_LOCATION_TYPE_HOST_NUMA' in found_values}} - #: Location is a host NUMA node, thus id is a host NUMA node id - CU_MEM_LOCATION_TYPE_HOST_NUMA = cydriver.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_HOST_NUMA{{endif}} + CU_MEM_LOCATION_TYPE_HOST_NUMA = ( + cydriver.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_HOST_NUMA, + 'Location is a host NUMA node, thus id is a host NUMA node id\n' + ){{endif}} {{if 'CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT' in found_values}} - #: Location is a host NUMA node of the current thread, id is ignored - CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT = cydriver.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT{{endif}} + CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT = ( + cydriver.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT, + 'Location is a host NUMA node of the current thread, id is ignored\n' + ){{endif}} {{if 'CU_MEM_LOCATION_TYPE_MAX' in found_values}} CU_MEM_LOCATION_TYPE_MAX = cydriver.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_MAX{{endif}} -_dict_CUmemLocationType = dict(((int(v), v) for k, v in CUmemLocationType.__members__.items())) {{endif}} {{if 'CUmemAllocationType_enum' in found_types}} -class CUmemAllocationType(IntEnum): +class CUmemAllocationType(_FastEnum): """ Defines the allocation types available """ @@ -4741,39 +5936,45 @@ class CUmemAllocationType(IntEnum): CU_MEM_ALLOCATION_TYPE_INVALID = cydriver.CUmemAllocationType_enum.CU_MEM_ALLOCATION_TYPE_INVALID{{endif}} {{if 'CU_MEM_ALLOCATION_TYPE_PINNED' in found_values}} - #: This allocation type is 'pinned', i.e. cannot migrate from its - #: current location while the application is actively using it - CU_MEM_ALLOCATION_TYPE_PINNED = cydriver.CUmemAllocationType_enum.CU_MEM_ALLOCATION_TYPE_PINNED{{endif}} + CU_MEM_ALLOCATION_TYPE_PINNED = ( + cydriver.CUmemAllocationType_enum.CU_MEM_ALLOCATION_TYPE_PINNED, + "This allocation type is 'pinned', i.e. cannot migrate from its current\n" + 'location while the application is actively using it\n' + ){{endif}} {{if 'CU_MEM_ALLOCATION_TYPE_MANAGED' in found_values}} - #: This allocation type is managed memory - CU_MEM_ALLOCATION_TYPE_MANAGED = cydriver.CUmemAllocationType_enum.CU_MEM_ALLOCATION_TYPE_MANAGED{{endif}} + CU_MEM_ALLOCATION_TYPE_MANAGED = ( + cydriver.CUmemAllocationType_enum.CU_MEM_ALLOCATION_TYPE_MANAGED, + 'This allocation type is managed memory\n' + ){{endif}} {{if 'CU_MEM_ALLOCATION_TYPE_MAX' in found_values}} CU_MEM_ALLOCATION_TYPE_MAX = cydriver.CUmemAllocationType_enum.CU_MEM_ALLOCATION_TYPE_MAX{{endif}} -_dict_CUmemAllocationType = dict(((int(v), v) for k, v in CUmemAllocationType.__members__.items())) {{endif}} {{if 'CUmemAllocationGranularity_flags_enum' in found_types}} -class CUmemAllocationGranularity_flags(IntEnum): +class CUmemAllocationGranularity_flags(_FastEnum): """ Flag for requesting different optimal and required granularities for an allocation. """ {{if 'CU_MEM_ALLOC_GRANULARITY_MINIMUM' in found_values}} - #: Minimum required granularity for allocation - CU_MEM_ALLOC_GRANULARITY_MINIMUM = cydriver.CUmemAllocationGranularity_flags_enum.CU_MEM_ALLOC_GRANULARITY_MINIMUM{{endif}} + CU_MEM_ALLOC_GRANULARITY_MINIMUM = ( + cydriver.CUmemAllocationGranularity_flags_enum.CU_MEM_ALLOC_GRANULARITY_MINIMUM, + 'Minimum required granularity for allocation\n' + ){{endif}} {{if 'CU_MEM_ALLOC_GRANULARITY_RECOMMENDED' in found_values}} - #: Recommended granularity for allocation for best performance - CU_MEM_ALLOC_GRANULARITY_RECOMMENDED = cydriver.CUmemAllocationGranularity_flags_enum.CU_MEM_ALLOC_GRANULARITY_RECOMMENDED{{endif}} + CU_MEM_ALLOC_GRANULARITY_RECOMMENDED = ( + cydriver.CUmemAllocationGranularity_flags_enum.CU_MEM_ALLOC_GRANULARITY_RECOMMENDED, + 'Recommended granularity for allocation for best performance\n' + ){{endif}} -_dict_CUmemAllocationGranularity_flags = dict(((int(v), v) for k, v in CUmemAllocationGranularity_flags.__members__.items())) {{endif}} {{if 'CUmemRangeHandleType_enum' in found_types}} -class CUmemRangeHandleType(IntEnum): +class CUmemRangeHandleType(_FastEnum): """ Specifies the handle type for address range """ @@ -4782,24 +5983,24 @@ class CUmemRangeHandleType(IntEnum): {{if 'CU_MEM_RANGE_HANDLE_TYPE_MAX' in found_values}} CU_MEM_RANGE_HANDLE_TYPE_MAX = cydriver.CUmemRangeHandleType_enum.CU_MEM_RANGE_HANDLE_TYPE_MAX{{endif}} -_dict_CUmemRangeHandleType = dict(((int(v), v) for k, v in CUmemRangeHandleType.__members__.items())) {{endif}} {{if 'CUmemRangeFlags_enum' in found_types}} -class CUmemRangeFlags(IntEnum): +class CUmemRangeFlags(_FastEnum): """ Flag for requesting handle type for address range. """ {{if 'CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE' in found_values}} - #: Indicates that DMA_BUF handle should be mapped via PCIe BAR1 - CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE = cydriver.CUmemRangeFlags_enum.CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE{{endif}} + CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE = ( + cydriver.CUmemRangeFlags_enum.CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE, + 'Indicates that DMA_BUF handle should be mapped via PCIe BAR1\n' + ){{endif}} -_dict_CUmemRangeFlags = dict(((int(v), v) for k, v in CUmemRangeFlags.__members__.items())) {{endif}} {{if 'CUarraySparseSubresourceType_enum' in found_types}} -class CUarraySparseSubresourceType(IntEnum): +class CUarraySparseSubresourceType(_FastEnum): """ Sparse subresource types """ @@ -4808,11 +6009,10 @@ class CUarraySparseSubresourceType(IntEnum): {{if 'CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL' in found_values}} CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL = cydriver.CUarraySparseSubresourceType_enum.CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL{{endif}} -_dict_CUarraySparseSubresourceType = dict(((int(v), v) for k, v in CUarraySparseSubresourceType.__members__.items())) {{endif}} {{if 'CUmemOperationType_enum' in found_types}} -class CUmemOperationType(IntEnum): +class CUmemOperationType(_FastEnum): """ Memory operation types """ @@ -4821,165 +6021,200 @@ class CUmemOperationType(IntEnum): {{if 'CU_MEM_OPERATION_TYPE_UNMAP' in found_values}} CU_MEM_OPERATION_TYPE_UNMAP = cydriver.CUmemOperationType_enum.CU_MEM_OPERATION_TYPE_UNMAP{{endif}} -_dict_CUmemOperationType = dict(((int(v), v) for k, v in CUmemOperationType.__members__.items())) {{endif}} {{if 'CUmemHandleType_enum' in found_types}} -class CUmemHandleType(IntEnum): +class CUmemHandleType(_FastEnum): """ Memory handle types """ {{if 'CU_MEM_HANDLE_TYPE_GENERIC' in found_values}} CU_MEM_HANDLE_TYPE_GENERIC = cydriver.CUmemHandleType_enum.CU_MEM_HANDLE_TYPE_GENERIC{{endif}} -_dict_CUmemHandleType = dict(((int(v), v) for k, v in CUmemHandleType.__members__.items())) {{endif}} {{if 'CUmemAllocationCompType_enum' in found_types}} -class CUmemAllocationCompType(IntEnum): +class CUmemAllocationCompType(_FastEnum): """ Specifies compression attribute for an allocation. """ {{if 'CU_MEM_ALLOCATION_COMP_NONE' in found_values}} - #: Allocating non-compressible memory - CU_MEM_ALLOCATION_COMP_NONE = cydriver.CUmemAllocationCompType_enum.CU_MEM_ALLOCATION_COMP_NONE{{endif}} + CU_MEM_ALLOCATION_COMP_NONE = ( + cydriver.CUmemAllocationCompType_enum.CU_MEM_ALLOCATION_COMP_NONE, + 'Allocating non-compressible memory\n' + ){{endif}} {{if 'CU_MEM_ALLOCATION_COMP_GENERIC' in found_values}} - #: Allocating compressible memory - CU_MEM_ALLOCATION_COMP_GENERIC = cydriver.CUmemAllocationCompType_enum.CU_MEM_ALLOCATION_COMP_GENERIC{{endif}} + CU_MEM_ALLOCATION_COMP_GENERIC = ( + cydriver.CUmemAllocationCompType_enum.CU_MEM_ALLOCATION_COMP_GENERIC, + 'Allocating compressible memory\n' + ){{endif}} -_dict_CUmemAllocationCompType = dict(((int(v), v) for k, v in CUmemAllocationCompType.__members__.items())) {{endif}} {{if 'CUmulticastGranularity_flags_enum' in found_types}} -class CUmulticastGranularity_flags(IntEnum): +class CUmulticastGranularity_flags(_FastEnum): """ Flags for querying different granularities for a multicast object """ {{if 'CU_MULTICAST_GRANULARITY_MINIMUM' in found_values}} - #: Minimum required granularity - CU_MULTICAST_GRANULARITY_MINIMUM = cydriver.CUmulticastGranularity_flags_enum.CU_MULTICAST_GRANULARITY_MINIMUM{{endif}} + CU_MULTICAST_GRANULARITY_MINIMUM = ( + cydriver.CUmulticastGranularity_flags_enum.CU_MULTICAST_GRANULARITY_MINIMUM, + 'Minimum required granularity\n' + ){{endif}} {{if 'CU_MULTICAST_GRANULARITY_RECOMMENDED' in found_values}} - #: Recommended granularity for best performance - CU_MULTICAST_GRANULARITY_RECOMMENDED = cydriver.CUmulticastGranularity_flags_enum.CU_MULTICAST_GRANULARITY_RECOMMENDED{{endif}} + CU_MULTICAST_GRANULARITY_RECOMMENDED = ( + cydriver.CUmulticastGranularity_flags_enum.CU_MULTICAST_GRANULARITY_RECOMMENDED, + 'Recommended granularity for best performance\n' + ){{endif}} -_dict_CUmulticastGranularity_flags = dict(((int(v), v) for k, v in CUmulticastGranularity_flags.__members__.items())) {{endif}} {{if 'CUgraphExecUpdateResult_enum' in found_types}} -class CUgraphExecUpdateResult(IntEnum): +class CUgraphExecUpdateResult(_FastEnum): """ CUDA Graph Update error types """ {{if 'CU_GRAPH_EXEC_UPDATE_SUCCESS' in found_values}} - #: The update succeeded - CU_GRAPH_EXEC_UPDATE_SUCCESS = cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_SUCCESS{{endif}} + CU_GRAPH_EXEC_UPDATE_SUCCESS = ( + cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_SUCCESS, + 'The update succeeded\n' + ){{endif}} {{if 'CU_GRAPH_EXEC_UPDATE_ERROR' in found_values}} - #: The update failed for an unexpected reason which is described in the - #: return value of the function - CU_GRAPH_EXEC_UPDATE_ERROR = cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR{{endif}} + CU_GRAPH_EXEC_UPDATE_ERROR = ( + cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR, + 'The update failed for an unexpected reason which is described in the return\n' + 'value of the function\n' + ){{endif}} {{if 'CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED' in found_values}} - #: The update failed because the topology changed - CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED = cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED{{endif}} + CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED = ( + cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED, + 'The update failed because the topology changed\n' + ){{endif}} {{if 'CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED' in found_values}} - #: The update failed because a node type changed - CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED = cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED{{endif}} + CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED = ( + cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED, + 'The update failed because a node type changed\n' + ){{endif}} {{if 'CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED' in found_values}} - #: The update failed because the function of a kernel node changed - #: (CUDA driver < 11.2) - CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED = cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED{{endif}} + CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED = ( + cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED, + 'The update failed because the function of a kernel node changed (CUDA\n' + 'driver < 11.2)\n' + ){{endif}} {{if 'CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED' in found_values}} - #: The update failed because the parameters changed in a way that is - #: not supported - CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED = cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED{{endif}} + CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED = ( + cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED, + 'The update failed because the parameters changed in a way that is not\n' + 'supported\n' + ){{endif}} {{if 'CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED' in found_values}} - #: The update failed because something about the node is not supported - CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED = cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED{{endif}} + CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED = ( + cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED, + 'The update failed because something about the node is not supported\n' + ){{endif}} {{if 'CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE' in found_values}} - #: The update failed because the function of a kernel node changed in - #: an unsupported way - CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE = cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE{{endif}} + CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE = ( + cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE, + 'The update failed because the function of a kernel node changed in an\n' + 'unsupported way\n' + ){{endif}} {{if 'CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED' in found_values}} - #: The update failed because the node attributes changed in a way that - #: is not supported - CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED = cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED{{endif}} + CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED = ( + cydriver.CUgraphExecUpdateResult_enum.CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED, + 'The update failed because the node attributes changed in a way that is not\n' + 'supported\n' + ){{endif}} -_dict_CUgraphExecUpdateResult = dict(((int(v), v) for k, v in CUgraphExecUpdateResult.__members__.items())) {{endif}} {{if 'CUmemPool_attribute_enum' in found_types}} -class CUmemPool_attribute(IntEnum): +class CUmemPool_attribute(_FastEnum): """ CUDA memory pool attributes """ {{if 'CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES' in found_values}} - #: (value type = int) Allow cuMemAllocAsync to use memory - #: asynchronously freed in another streams as long as a stream ordering - #: dependency of the allocating stream on the free action exists. Cuda - #: events and null stream interactions can create the required stream - #: ordered dependencies. (default enabled) - CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES = cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES{{endif}} + CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES = ( + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES, + '(value type = int) Allow cuMemAllocAsync to use memory asynchronously freed\n' + 'in another streams as long as a stream ordering dependency of the\n' + 'allocating stream on the free action exists. Cuda events and null stream\n' + 'interactions can create the required stream ordered dependencies. (default\n' + 'enabled)\n' + ){{endif}} {{if 'CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC' in found_values}} - #: (value type = int) Allow reuse of already completed frees when there - #: is no dependency between the free and allocation. (default enabled) - CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC = cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC{{endif}} + CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC = ( + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC, + '(value type = int) Allow reuse of already completed frees when there is no\n' + 'dependency between the free and allocation. (default enabled)\n' + ){{endif}} {{if 'CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES' in found_values}} - #: (value type = int) Allow cuMemAllocAsync to insert new stream - #: dependencies in order to establish the stream ordering required to - #: reuse a piece of memory released by cuMemFreeAsync (default - #: enabled). - CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES = cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES{{endif}} + CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES = ( + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES, + '(value type = int) Allow cuMemAllocAsync to insert new stream dependencies\n' + 'in order to establish the stream ordering required to reuse a piece of\n' + 'memory released by cuMemFreeAsync (default enabled).\n' + ){{endif}} {{if 'CU_MEMPOOL_ATTR_RELEASE_THRESHOLD' in found_values}} - #: (value type = cuuint64_t) Amount of reserved memory in bytes to hold - #: onto before trying to release memory back to the OS. When more than - #: the release threshold bytes of memory are held by the memory pool, - #: the allocator will try to release memory back to the OS on the next - #: call to stream, event or context synchronize. (default 0) - CU_MEMPOOL_ATTR_RELEASE_THRESHOLD = cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RELEASE_THRESHOLD{{endif}} + CU_MEMPOOL_ATTR_RELEASE_THRESHOLD = ( + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RELEASE_THRESHOLD, + '(value type = cuuint64_t) Amount of reserved memory in bytes to hold onto\n' + 'before trying to release memory back to the OS. When more than the release\n' + 'threshold bytes of memory are held by the memory pool, the allocator will\n' + 'try to release memory back to the OS on the next call to stream, event or\n' + 'context synchronize. (default 0)\n' + ){{endif}} {{if 'CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT' in found_values}} - #: (value type = cuuint64_t) Amount of backing memory currently - #: allocated for the mempool. - CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT = cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT{{endif}} + CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT = ( + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT, + '(value type = cuuint64_t) Amount of backing memory currently allocated for\n' + 'the mempool.\n' + ){{endif}} {{if 'CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH' in found_values}} - #: (value type = cuuint64_t) High watermark of backing memory allocated - #: for the mempool since the last time it was reset. High watermark can - #: only be reset to zero. - CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH = cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH{{endif}} + CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH = ( + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH, + '(value type = cuuint64_t) High watermark of backing memory allocated for\n' + 'the mempool since the last time it was reset. High watermark can only be\n' + 'reset to zero.\n' + ){{endif}} {{if 'CU_MEMPOOL_ATTR_USED_MEM_CURRENT' in found_values}} - #: (value type = cuuint64_t) Amount of memory from the pool that is - #: currently in use by the application. - CU_MEMPOOL_ATTR_USED_MEM_CURRENT = cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_CURRENT{{endif}} + CU_MEMPOOL_ATTR_USED_MEM_CURRENT = ( + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_CURRENT, + '(value type = cuuint64_t) Amount of memory from the pool that is currently\n' + 'in use by the application.\n' + ){{endif}} {{if 'CU_MEMPOOL_ATTR_USED_MEM_HIGH' in found_values}} - #: (value type = cuuint64_t) High watermark of the amount of memory - #: from the pool that was in use by the application since the last time - #: it was reset. High watermark can only be reset to zero. - CU_MEMPOOL_ATTR_USED_MEM_HIGH = cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_HIGH{{endif}} + CU_MEMPOOL_ATTR_USED_MEM_HIGH = ( + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_USED_MEM_HIGH, + '(value type = cuuint64_t) High watermark of the amount of memory from the\n' + 'pool that was in use by the application since the last time it was reset.\n' + 'High watermark can only be reset to zero.\n' + ){{endif}} -_dict_CUmemPool_attribute = dict(((int(v), v) for k, v in CUmemPool_attribute.__members__.items())) {{endif}} {{if 'CUmemcpyFlags_enum' in found_types}} -class CUmemcpyFlags(IntEnum): +class CUmemcpyFlags(_FastEnum): """ Flags to specify for copies within a batch. For more details see :py:obj:`~.cuMemcpyBatchAsync`. @@ -4988,15 +6223,16 @@ class CUmemcpyFlags(IntEnum): CU_MEMCPY_FLAG_DEFAULT = cydriver.CUmemcpyFlags_enum.CU_MEMCPY_FLAG_DEFAULT{{endif}} {{if 'CU_MEMCPY_FLAG_PREFER_OVERLAP_WITH_COMPUTE' in found_values}} - #: Hint to the driver to try and overlap the copy with compute work on - #: the SMs. - CU_MEMCPY_FLAG_PREFER_OVERLAP_WITH_COMPUTE = cydriver.CUmemcpyFlags_enum.CU_MEMCPY_FLAG_PREFER_OVERLAP_WITH_COMPUTE{{endif}} + CU_MEMCPY_FLAG_PREFER_OVERLAP_WITH_COMPUTE = ( + cydriver.CUmemcpyFlags_enum.CU_MEMCPY_FLAG_PREFER_OVERLAP_WITH_COMPUTE, + 'Hint to the driver to try and overlap the copy with compute work on the\n' + 'SMs.\n' + ){{endif}} -_dict_CUmemcpyFlags = dict(((int(v), v) for k, v in CUmemcpyFlags.__members__.items())) {{endif}} {{if 'CUmemcpySrcAccessOrder_enum' in found_types}} -class CUmemcpySrcAccessOrder(IntEnum): +class CUmemcpySrcAccessOrder(_FastEnum): """ These flags allow applications to convey the source access ordering CUDA must maintain. The destination will always be accessed in @@ -5004,416 +6240,499 @@ class CUmemcpySrcAccessOrder(IntEnum): """ {{if 'CU_MEMCPY_SRC_ACCESS_ORDER_INVALID' in found_values}} - #: Default invalid. - CU_MEMCPY_SRC_ACCESS_ORDER_INVALID = cydriver.CUmemcpySrcAccessOrder_enum.CU_MEMCPY_SRC_ACCESS_ORDER_INVALID{{endif}} + CU_MEMCPY_SRC_ACCESS_ORDER_INVALID = ( + cydriver.CUmemcpySrcAccessOrder_enum.CU_MEMCPY_SRC_ACCESS_ORDER_INVALID, + 'Default invalid.\n' + ){{endif}} {{if 'CU_MEMCPY_SRC_ACCESS_ORDER_STREAM' in found_values}} - #: Indicates that access to the source pointer must be in stream order. - CU_MEMCPY_SRC_ACCESS_ORDER_STREAM = cydriver.CUmemcpySrcAccessOrder_enum.CU_MEMCPY_SRC_ACCESS_ORDER_STREAM{{endif}} + CU_MEMCPY_SRC_ACCESS_ORDER_STREAM = ( + cydriver.CUmemcpySrcAccessOrder_enum.CU_MEMCPY_SRC_ACCESS_ORDER_STREAM, + 'Indicates that access to the source pointer must be in stream order.\n' + ){{endif}} {{if 'CU_MEMCPY_SRC_ACCESS_ORDER_DURING_API_CALL' in found_values}} - #: Indicates that access to the source pointer can be out of stream - #: order and all accesses must be complete before the API call returns. - #: This flag is suited for ephemeral sources (ex., stack variables) - #: when it's known that no prior operations in the stream can be - #: accessing the memory and also that the lifetime of the memory is - #: limited to the scope that the source variable was declared in. - #: Specifying this flag allows the driver to optimize the copy and - #: removes the need for the user to synchronize the stream after the - #: API call. - CU_MEMCPY_SRC_ACCESS_ORDER_DURING_API_CALL = cydriver.CUmemcpySrcAccessOrder_enum.CU_MEMCPY_SRC_ACCESS_ORDER_DURING_API_CALL{{endif}} + CU_MEMCPY_SRC_ACCESS_ORDER_DURING_API_CALL = ( + cydriver.CUmemcpySrcAccessOrder_enum.CU_MEMCPY_SRC_ACCESS_ORDER_DURING_API_CALL, + 'Indicates that access to the source pointer can be out of stream order and\n' + 'all accesses must be complete before the API call returns. This flag is\n' + "suited for ephemeral sources (ex., stack variables) when it's known that no\n" + 'prior operations in the stream can be accessing the memory and also that\n' + 'the lifetime of the memory is limited to the scope that the source variable\n' + 'was declared in. Specifying this flag allows the driver to optimize the\n' + 'copy and removes the need for the user to synchronize the stream after the\n' + 'API call.\n' + ){{endif}} {{if 'CU_MEMCPY_SRC_ACCESS_ORDER_ANY' in found_values}} - #: Indicates that access to the source pointer can be out of stream - #: order and the accesses can happen even after the API call returns. - #: This flag is suited for host pointers allocated outside CUDA (ex., - #: via malloc) when it's known that no prior operations in the stream - #: can be accessing the memory. Specifying this flag allows the driver - #: to optimize the copy on certain platforms. - CU_MEMCPY_SRC_ACCESS_ORDER_ANY = cydriver.CUmemcpySrcAccessOrder_enum.CU_MEMCPY_SRC_ACCESS_ORDER_ANY{{endif}} + CU_MEMCPY_SRC_ACCESS_ORDER_ANY = ( + cydriver.CUmemcpySrcAccessOrder_enum.CU_MEMCPY_SRC_ACCESS_ORDER_ANY, + 'Indicates that access to the source pointer can be out of stream order and\n' + 'the accesses can happen even after the API call returns. This flag is\n' + "suited for host pointers allocated outside CUDA (ex., via malloc) when it's\n" + 'known that no prior operations in the stream can be accessing the memory.\n' + 'Specifying this flag allows the driver to optimize the copy on certain\n' + 'platforms.\n' + ){{endif}} {{if 'CU_MEMCPY_SRC_ACCESS_ORDER_MAX' in found_values}} CU_MEMCPY_SRC_ACCESS_ORDER_MAX = cydriver.CUmemcpySrcAccessOrder_enum.CU_MEMCPY_SRC_ACCESS_ORDER_MAX{{endif}} -_dict_CUmemcpySrcAccessOrder = dict(((int(v), v) for k, v in CUmemcpySrcAccessOrder.__members__.items())) {{endif}} {{if 'CUmemcpy3DOperandType_enum' in found_types}} -class CUmemcpy3DOperandType(IntEnum): +class CUmemcpy3DOperandType(_FastEnum): """ These flags allow applications to convey the operand type for individual copies specified in :py:obj:`~.cuMemcpy3DBatchAsync`. """ {{if 'CU_MEMCPY_OPERAND_TYPE_POINTER' in found_values}} - #: Memcpy operand is a valid pointer. - CU_MEMCPY_OPERAND_TYPE_POINTER = cydriver.CUmemcpy3DOperandType_enum.CU_MEMCPY_OPERAND_TYPE_POINTER{{endif}} + CU_MEMCPY_OPERAND_TYPE_POINTER = ( + cydriver.CUmemcpy3DOperandType_enum.CU_MEMCPY_OPERAND_TYPE_POINTER, + 'Memcpy operand is a valid pointer.\n' + ){{endif}} {{if 'CU_MEMCPY_OPERAND_TYPE_ARRAY' in found_values}} - #: Memcpy operand is a CUarray. - CU_MEMCPY_OPERAND_TYPE_ARRAY = cydriver.CUmemcpy3DOperandType_enum.CU_MEMCPY_OPERAND_TYPE_ARRAY{{endif}} + CU_MEMCPY_OPERAND_TYPE_ARRAY = ( + cydriver.CUmemcpy3DOperandType_enum.CU_MEMCPY_OPERAND_TYPE_ARRAY, + 'Memcpy operand is a CUarray.\n' + ){{endif}} {{if 'CU_MEMCPY_OPERAND_TYPE_MAX' in found_values}} CU_MEMCPY_OPERAND_TYPE_MAX = cydriver.CUmemcpy3DOperandType_enum.CU_MEMCPY_OPERAND_TYPE_MAX{{endif}} -_dict_CUmemcpy3DOperandType = dict(((int(v), v) for k, v in CUmemcpy3DOperandType.__members__.items())) {{endif}} {{if 'CUgraphMem_attribute_enum' in found_types}} -class CUgraphMem_attribute(IntEnum): +class CUgraphMem_attribute(_FastEnum): """ """ {{if 'CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT' in found_values}} - #: (value type = cuuint64_t) Amount of memory, in bytes, currently - #: associated with graphs - CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT = cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT{{endif}} + CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT = ( + cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT, + '(value type = cuuint64_t) Amount of memory, in bytes, currently associated\n' + 'with graphs\n' + ){{endif}} {{if 'CU_GRAPH_MEM_ATTR_USED_MEM_HIGH' in found_values}} - #: (value type = cuuint64_t) High watermark of memory, in bytes, - #: associated with graphs since the last time it was reset. High - #: watermark can only be reset to zero. - CU_GRAPH_MEM_ATTR_USED_MEM_HIGH = cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_HIGH{{endif}} + CU_GRAPH_MEM_ATTR_USED_MEM_HIGH = ( + cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_USED_MEM_HIGH, + '(value type = cuuint64_t) High watermark of memory, in bytes, associated\n' + 'with graphs since the last time it was reset. High watermark can only be\n' + 'reset to zero.\n' + ){{endif}} {{if 'CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT' in found_values}} - #: (value type = cuuint64_t) Amount of memory, in bytes, currently - #: allocated for use by the CUDA graphs asynchronous allocator. - CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT = cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT{{endif}} + CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT = ( + cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT, + '(value type = cuuint64_t) Amount of memory, in bytes, currently allocated\n' + 'for use by the CUDA graphs asynchronous allocator.\n' + ){{endif}} {{if 'CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH' in found_values}} - #: (value type = cuuint64_t) High watermark of memory, in bytes, - #: currently allocated for use by the CUDA graphs asynchronous - #: allocator. - CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH = cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH{{endif}} + CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH = ( + cydriver.CUgraphMem_attribute_enum.CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH, + '(value type = cuuint64_t) High watermark of memory, in bytes, currently\n' + 'allocated for use by the CUDA graphs asynchronous allocator.\n' + ){{endif}} -_dict_CUgraphMem_attribute = dict(((int(v), v) for k, v in CUgraphMem_attribute.__members__.items())) {{endif}} {{if 'CUgraphChildGraphNodeOwnership_enum' in found_types}} -class CUgraphChildGraphNodeOwnership(IntEnum): +class CUgraphChildGraphNodeOwnership(_FastEnum): """ Child graph node ownership """ {{if 'CU_GRAPH_CHILD_GRAPH_OWNERSHIP_CLONE' in found_values}} - #: Default behavior for a child graph node. Child graph is cloned into - #: the parent and memory allocation/free nodes can't be present in the - #: child graph. - CU_GRAPH_CHILD_GRAPH_OWNERSHIP_CLONE = cydriver.CUgraphChildGraphNodeOwnership_enum.CU_GRAPH_CHILD_GRAPH_OWNERSHIP_CLONE{{endif}} + CU_GRAPH_CHILD_GRAPH_OWNERSHIP_CLONE = ( + cydriver.CUgraphChildGraphNodeOwnership_enum.CU_GRAPH_CHILD_GRAPH_OWNERSHIP_CLONE, + 'Default behavior for a child graph node. Child graph is cloned into the\n' + "parent and memory allocation/free nodes can't be present in the child\n" + 'graph.\n' + ){{endif}} {{if 'CU_GRAPH_CHILD_GRAPH_OWNERSHIP_MOVE' in found_values}} - #: The child graph is moved to the parent. The handle to the child - #: graph is owned by the parent and will be destroyed when the parent - #: is destroyed. - #: - #: The following restrictions apply to child graphs after they have - #: been moved: Cannot be independently instantiated or destroyed; - #: Cannot be added as a child graph of a separate parent graph; Cannot - #: be used as an argument to cuGraphExecUpdate; Cannot have additional - #: memory allocation or free nodes added. - CU_GRAPH_CHILD_GRAPH_OWNERSHIP_MOVE = cydriver.CUgraphChildGraphNodeOwnership_enum.CU_GRAPH_CHILD_GRAPH_OWNERSHIP_MOVE{{endif}} + CU_GRAPH_CHILD_GRAPH_OWNERSHIP_MOVE = ( + cydriver.CUgraphChildGraphNodeOwnership_enum.CU_GRAPH_CHILD_GRAPH_OWNERSHIP_MOVE, + 'The child graph is moved to the parent. The handle to the child graph is\n' + 'owned by the parent and will be destroyed when the parent is destroyed.\n' + 'The following restrictions apply to child graphs after they have been\n' + 'moved: Cannot be independently instantiated or destroyed; Cannot be added\n' + 'as a child graph of a separate parent graph; Cannot be used as an argument\n' + 'to cuGraphExecUpdate; Cannot have additional memory allocation or free\n' + 'nodes added.\n' + ){{endif}} -_dict_CUgraphChildGraphNodeOwnership = dict(((int(v), v) for k, v in CUgraphChildGraphNodeOwnership.__members__.items())) {{endif}} {{if 'CUflushGPUDirectRDMAWritesOptions_enum' in found_types}} -class CUflushGPUDirectRDMAWritesOptions(IntEnum): +class CUflushGPUDirectRDMAWritesOptions(_FastEnum): """ Bitmasks for :py:obj:`~.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS` """ {{if 'CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_HOST' in found_values}} - #: :py:obj:`~.cuFlushGPUDirectRDMAWrites()` and its CUDA Runtime API - #: counterpart are supported on the device. - CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_HOST = cydriver.CUflushGPUDirectRDMAWritesOptions_enum.CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_HOST{{endif}} + CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_HOST = ( + cydriver.CUflushGPUDirectRDMAWritesOptions_enum.CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_HOST, + ':py:obj:`~.cuFlushGPUDirectRDMAWrites()` and its CUDA Runtime API\n' + 'counterpart are supported on the device.\n' + ){{endif}} {{if 'CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS' in found_values}} - #: The :py:obj:`~.CU_STREAM_WAIT_VALUE_FLUSH` flag and the - #: :py:obj:`~.CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES` MemOp are supported - #: on the device. - CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS = cydriver.CUflushGPUDirectRDMAWritesOptions_enum.CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS{{endif}} + CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS = ( + cydriver.CUflushGPUDirectRDMAWritesOptions_enum.CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS, + 'The :py:obj:`~.CU_STREAM_WAIT_VALUE_FLUSH` flag and the\n' + ':py:obj:`~.CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES` MemOp are supported on the\n' + 'device.\n' + ){{endif}} -_dict_CUflushGPUDirectRDMAWritesOptions = dict(((int(v), v) for k, v in CUflushGPUDirectRDMAWritesOptions.__members__.items())) {{endif}} {{if 'CUGPUDirectRDMAWritesOrdering_enum' in found_types}} -class CUGPUDirectRDMAWritesOrdering(IntEnum): +class CUGPUDirectRDMAWritesOrdering(_FastEnum): """ Platform native ordering for GPUDirect RDMA writes """ {{if 'CU_GPU_DIRECT_RDMA_WRITES_ORDERING_NONE' in found_values}} - #: The device does not natively support ordering of remote writes. - #: :py:obj:`~.cuFlushGPUDirectRDMAWrites()` can be leveraged if - #: supported. - CU_GPU_DIRECT_RDMA_WRITES_ORDERING_NONE = cydriver.CUGPUDirectRDMAWritesOrdering_enum.CU_GPU_DIRECT_RDMA_WRITES_ORDERING_NONE{{endif}} + CU_GPU_DIRECT_RDMA_WRITES_ORDERING_NONE = ( + cydriver.CUGPUDirectRDMAWritesOrdering_enum.CU_GPU_DIRECT_RDMA_WRITES_ORDERING_NONE, + 'The device does not natively support ordering of remote writes.\n' + ':py:obj:`~.cuFlushGPUDirectRDMAWrites()` can be leveraged if supported.\n' + ){{endif}} {{if 'CU_GPU_DIRECT_RDMA_WRITES_ORDERING_OWNER' in found_values}} - #: Natively, the device can consistently consume remote writes, - #: although other CUDA devices may not. - CU_GPU_DIRECT_RDMA_WRITES_ORDERING_OWNER = cydriver.CUGPUDirectRDMAWritesOrdering_enum.CU_GPU_DIRECT_RDMA_WRITES_ORDERING_OWNER{{endif}} + CU_GPU_DIRECT_RDMA_WRITES_ORDERING_OWNER = ( + cydriver.CUGPUDirectRDMAWritesOrdering_enum.CU_GPU_DIRECT_RDMA_WRITES_ORDERING_OWNER, + 'Natively, the device can consistently consume remote writes, although other\n' + 'CUDA devices may not.\n' + ){{endif}} {{if 'CU_GPU_DIRECT_RDMA_WRITES_ORDERING_ALL_DEVICES' in found_values}} - #: Any CUDA device in the system can consistently consume remote writes - #: to this device. - CU_GPU_DIRECT_RDMA_WRITES_ORDERING_ALL_DEVICES = cydriver.CUGPUDirectRDMAWritesOrdering_enum.CU_GPU_DIRECT_RDMA_WRITES_ORDERING_ALL_DEVICES{{endif}} + CU_GPU_DIRECT_RDMA_WRITES_ORDERING_ALL_DEVICES = ( + cydriver.CUGPUDirectRDMAWritesOrdering_enum.CU_GPU_DIRECT_RDMA_WRITES_ORDERING_ALL_DEVICES, + 'Any CUDA device in the system can consistently consume remote writes to\n' + 'this device.\n' + ){{endif}} -_dict_CUGPUDirectRDMAWritesOrdering = dict(((int(v), v) for k, v in CUGPUDirectRDMAWritesOrdering.__members__.items())) {{endif}} {{if 'CUflushGPUDirectRDMAWritesScope_enum' in found_types}} -class CUflushGPUDirectRDMAWritesScope(IntEnum): +class CUflushGPUDirectRDMAWritesScope(_FastEnum): """ The scopes for :py:obj:`~.cuFlushGPUDirectRDMAWrites` """ {{if 'CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_OWNER' in found_values}} - #: Blocks until remote writes are visible to the CUDA device context - #: owning the data. - CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_OWNER = cydriver.CUflushGPUDirectRDMAWritesScope_enum.CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_OWNER{{endif}} + CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_OWNER = ( + cydriver.CUflushGPUDirectRDMAWritesScope_enum.CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_OWNER, + 'Blocks until remote writes are visible to the CUDA device context owning\n' + 'the data.\n' + ){{endif}} {{if 'CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES' in found_values}} - #: Blocks until remote writes are visible to all CUDA device contexts. - CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES = cydriver.CUflushGPUDirectRDMAWritesScope_enum.CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES{{endif}} + CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES = ( + cydriver.CUflushGPUDirectRDMAWritesScope_enum.CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES, + 'Blocks until remote writes are visible to all CUDA device contexts.\n' + ){{endif}} -_dict_CUflushGPUDirectRDMAWritesScope = dict(((int(v), v) for k, v in CUflushGPUDirectRDMAWritesScope.__members__.items())) {{endif}} {{if 'CUflushGPUDirectRDMAWritesTarget_enum' in found_types}} -class CUflushGPUDirectRDMAWritesTarget(IntEnum): +class CUflushGPUDirectRDMAWritesTarget(_FastEnum): """ The targets for :py:obj:`~.cuFlushGPUDirectRDMAWrites` """ {{if 'CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX' in found_values}} - #: Sets the target for :py:obj:`~.cuFlushGPUDirectRDMAWrites()` to the - #: currently active CUDA device context. - CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX = cydriver.CUflushGPUDirectRDMAWritesTarget_enum.CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX{{endif}} + CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX = ( + cydriver.CUflushGPUDirectRDMAWritesTarget_enum.CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX, + 'Sets the target for :py:obj:`~.cuFlushGPUDirectRDMAWrites()` to the\n' + 'currently active CUDA device context.\n' + ){{endif}} -_dict_CUflushGPUDirectRDMAWritesTarget = dict(((int(v), v) for k, v in CUflushGPUDirectRDMAWritesTarget.__members__.items())) {{endif}} {{if 'CUgraphDebugDot_flags_enum' in found_types}} -class CUgraphDebugDot_flags(IntEnum): +class CUgraphDebugDot_flags(_FastEnum): """ The additional write options for :py:obj:`~.cuGraphDebugDotPrint` """ {{if 'CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE' in found_values}} - #: Output all debug data as if every debug flag is enabled - CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE{{endif}} + CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE = ( + cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE, + 'Output all debug data as if every debug flag is enabled\n' + ){{endif}} {{if 'CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME_TYPES' in found_values}} - #: Use CUDA Runtime structures for output - CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME_TYPES = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME_TYPES{{endif}} + CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME_TYPES = ( + cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME_TYPES, + 'Use CUDA Runtime structures for output\n' + ){{endif}} {{if 'CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_PARAMS' in found_values}} - #: Adds CUDA_KERNEL_NODE_PARAMS values to output - CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_PARAMS = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_PARAMS{{endif}} + CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_PARAMS = ( + cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_PARAMS, + 'Adds CUDA_KERNEL_NODE_PARAMS values to output\n' + ){{endif}} {{if 'CU_GRAPH_DEBUG_DOT_FLAGS_MEMCPY_NODE_PARAMS' in found_values}} - #: Adds CUDA_MEMCPY3D values to output - CU_GRAPH_DEBUG_DOT_FLAGS_MEMCPY_NODE_PARAMS = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_MEMCPY_NODE_PARAMS{{endif}} + CU_GRAPH_DEBUG_DOT_FLAGS_MEMCPY_NODE_PARAMS = ( + cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_MEMCPY_NODE_PARAMS, + 'Adds CUDA_MEMCPY3D values to output\n' + ){{endif}} {{if 'CU_GRAPH_DEBUG_DOT_FLAGS_MEMSET_NODE_PARAMS' in found_values}} - #: Adds CUDA_MEMSET_NODE_PARAMS values to output - CU_GRAPH_DEBUG_DOT_FLAGS_MEMSET_NODE_PARAMS = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_MEMSET_NODE_PARAMS{{endif}} + CU_GRAPH_DEBUG_DOT_FLAGS_MEMSET_NODE_PARAMS = ( + cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_MEMSET_NODE_PARAMS, + 'Adds CUDA_MEMSET_NODE_PARAMS values to output\n' + ){{endif}} {{if 'CU_GRAPH_DEBUG_DOT_FLAGS_HOST_NODE_PARAMS' in found_values}} - #: Adds CUDA_HOST_NODE_PARAMS values to output - CU_GRAPH_DEBUG_DOT_FLAGS_HOST_NODE_PARAMS = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_HOST_NODE_PARAMS{{endif}} + CU_GRAPH_DEBUG_DOT_FLAGS_HOST_NODE_PARAMS = ( + cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_HOST_NODE_PARAMS, + 'Adds CUDA_HOST_NODE_PARAMS values to output\n' + ){{endif}} {{if 'CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_NODE_PARAMS' in found_values}} - #: Adds CUevent handle from record and wait nodes to output - CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_NODE_PARAMS = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_NODE_PARAMS{{endif}} + CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_NODE_PARAMS = ( + cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_NODE_PARAMS, + 'Adds CUevent handle from record and wait nodes to output\n' + ){{endif}} {{if 'CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_SIGNAL_NODE_PARAMS' in found_values}} - #: Adds CUDA_EXT_SEM_SIGNAL_NODE_PARAMS values to output - CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_SIGNAL_NODE_PARAMS = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_SIGNAL_NODE_PARAMS{{endif}} + CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_SIGNAL_NODE_PARAMS = ( + cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_SIGNAL_NODE_PARAMS, + 'Adds CUDA_EXT_SEM_SIGNAL_NODE_PARAMS values to output\n' + ){{endif}} {{if 'CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_WAIT_NODE_PARAMS' in found_values}} - #: Adds CUDA_EXT_SEM_WAIT_NODE_PARAMS values to output - CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_WAIT_NODE_PARAMS = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_WAIT_NODE_PARAMS{{endif}} + CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_WAIT_NODE_PARAMS = ( + cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_WAIT_NODE_PARAMS, + 'Adds CUDA_EXT_SEM_WAIT_NODE_PARAMS values to output\n' + ){{endif}} {{if 'CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_ATTRIBUTES' in found_values}} - #: Adds CUkernelNodeAttrValue values to output - CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_ATTRIBUTES = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_ATTRIBUTES{{endif}} + CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_ATTRIBUTES = ( + cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_ATTRIBUTES, + 'Adds CUkernelNodeAttrValue values to output\n' + ){{endif}} {{if 'CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES' in found_values}} - #: Adds node handles and every kernel function handle to output - CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES{{endif}} + CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES = ( + cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES, + 'Adds node handles and every kernel function handle to output\n' + ){{endif}} {{if 'CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALLOC_NODE_PARAMS' in found_values}} - #: Adds memory alloc node parameters to output - CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALLOC_NODE_PARAMS = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALLOC_NODE_PARAMS{{endif}} + CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALLOC_NODE_PARAMS = ( + cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALLOC_NODE_PARAMS, + 'Adds memory alloc node parameters to output\n' + ){{endif}} {{if 'CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FREE_NODE_PARAMS' in found_values}} - #: Adds memory free node parameters to output - CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FREE_NODE_PARAMS = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FREE_NODE_PARAMS{{endif}} + CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FREE_NODE_PARAMS = ( + cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FREE_NODE_PARAMS, + 'Adds memory free node parameters to output\n' + ){{endif}} {{if 'CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_MEM_OP_NODE_PARAMS' in found_values}} - #: Adds batch mem op node parameters to output - CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_MEM_OP_NODE_PARAMS = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_MEM_OP_NODE_PARAMS{{endif}} + CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_MEM_OP_NODE_PARAMS = ( + cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_MEM_OP_NODE_PARAMS, + 'Adds batch mem op node parameters to output\n' + ){{endif}} {{if 'CU_GRAPH_DEBUG_DOT_FLAGS_EXTRA_TOPO_INFO' in found_values}} - #: Adds edge numbering information - CU_GRAPH_DEBUG_DOT_FLAGS_EXTRA_TOPO_INFO = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_EXTRA_TOPO_INFO{{endif}} + CU_GRAPH_DEBUG_DOT_FLAGS_EXTRA_TOPO_INFO = ( + cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_EXTRA_TOPO_INFO, + 'Adds edge numbering information\n' + ){{endif}} {{if 'CU_GRAPH_DEBUG_DOT_FLAGS_CONDITIONAL_NODE_PARAMS' in found_values}} - #: Adds conditional node parameters to output - CU_GRAPH_DEBUG_DOT_FLAGS_CONDITIONAL_NODE_PARAMS = cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_CONDITIONAL_NODE_PARAMS{{endif}} + CU_GRAPH_DEBUG_DOT_FLAGS_CONDITIONAL_NODE_PARAMS = ( + cydriver.CUgraphDebugDot_flags_enum.CU_GRAPH_DEBUG_DOT_FLAGS_CONDITIONAL_NODE_PARAMS, + 'Adds conditional node parameters to output\n' + ){{endif}} -_dict_CUgraphDebugDot_flags = dict(((int(v), v) for k, v in CUgraphDebugDot_flags.__members__.items())) {{endif}} {{if 'CUuserObject_flags_enum' in found_types}} -class CUuserObject_flags(IntEnum): +class CUuserObject_flags(_FastEnum): """ Flags for user objects for graphs """ {{if 'CU_USER_OBJECT_NO_DESTRUCTOR_SYNC' in found_values}} - #: Indicates the destructor execution is not synchronized by any CUDA - #: handle. - CU_USER_OBJECT_NO_DESTRUCTOR_SYNC = cydriver.CUuserObject_flags_enum.CU_USER_OBJECT_NO_DESTRUCTOR_SYNC{{endif}} + CU_USER_OBJECT_NO_DESTRUCTOR_SYNC = ( + cydriver.CUuserObject_flags_enum.CU_USER_OBJECT_NO_DESTRUCTOR_SYNC, + 'Indicates the destructor execution is not synchronized by any CUDA handle.\n' + ){{endif}} -_dict_CUuserObject_flags = dict(((int(v), v) for k, v in CUuserObject_flags.__members__.items())) {{endif}} {{if 'CUuserObjectRetain_flags_enum' in found_types}} -class CUuserObjectRetain_flags(IntEnum): +class CUuserObjectRetain_flags(_FastEnum): """ Flags for retaining user object references for graphs """ {{if 'CU_GRAPH_USER_OBJECT_MOVE' in found_values}} - #: Transfer references from the caller rather than creating new - #: references. - CU_GRAPH_USER_OBJECT_MOVE = cydriver.CUuserObjectRetain_flags_enum.CU_GRAPH_USER_OBJECT_MOVE{{endif}} + CU_GRAPH_USER_OBJECT_MOVE = ( + cydriver.CUuserObjectRetain_flags_enum.CU_GRAPH_USER_OBJECT_MOVE, + 'Transfer references from the caller rather than creating new references.\n' + ){{endif}} -_dict_CUuserObjectRetain_flags = dict(((int(v), v) for k, v in CUuserObjectRetain_flags.__members__.items())) {{endif}} {{if 'CUgraphInstantiate_flags_enum' in found_types}} -class CUgraphInstantiate_flags(IntEnum): +class CUgraphInstantiate_flags(_FastEnum): """ Flags for instantiating a graph """ {{if 'CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH' in found_values}} - #: Automatically free memory allocated in a graph before relaunching. - CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH = cydriver.CUgraphInstantiate_flags_enum.CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH{{endif}} + CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH = ( + cydriver.CUgraphInstantiate_flags_enum.CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH, + 'Automatically free memory allocated in a graph before relaunching.\n' + ){{endif}} {{if 'CUDA_GRAPH_INSTANTIATE_FLAG_UPLOAD' in found_values}} - #: Automatically upload the graph after instantiation. Only supported - #: by :py:obj:`~.cuGraphInstantiateWithParams`. The upload will be - #: performed using the stream provided in `instantiateParams`. - CUDA_GRAPH_INSTANTIATE_FLAG_UPLOAD = cydriver.CUgraphInstantiate_flags_enum.CUDA_GRAPH_INSTANTIATE_FLAG_UPLOAD{{endif}} + CUDA_GRAPH_INSTANTIATE_FLAG_UPLOAD = ( + cydriver.CUgraphInstantiate_flags_enum.CUDA_GRAPH_INSTANTIATE_FLAG_UPLOAD, + 'Automatically upload the graph after instantiation. Only supported by\n' + ':py:obj:`~.cuGraphInstantiateWithParams`. The upload will be performed\n' + 'using the stream provided in `instantiateParams`.\n' + ){{endif}} {{if 'CUDA_GRAPH_INSTANTIATE_FLAG_DEVICE_LAUNCH' in found_values}} - #: Instantiate the graph to be launchable from the device. This flag - #: can only be used on platforms which support unified addressing. This - #: flag cannot be used in conjunction with - #: CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH. - CUDA_GRAPH_INSTANTIATE_FLAG_DEVICE_LAUNCH = cydriver.CUgraphInstantiate_flags_enum.CUDA_GRAPH_INSTANTIATE_FLAG_DEVICE_LAUNCH{{endif}} + CUDA_GRAPH_INSTANTIATE_FLAG_DEVICE_LAUNCH = ( + cydriver.CUgraphInstantiate_flags_enum.CUDA_GRAPH_INSTANTIATE_FLAG_DEVICE_LAUNCH, + 'Instantiate the graph to be launchable from the device. This flag can only\n' + 'be used on platforms which support unified addressing. This flag cannot be\n' + 'used in conjunction with CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH.\n' + ){{endif}} {{if 'CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY' in found_values}} - #: Run the graph using the per-node priority attributes rather than the - #: priority of the stream it is launched into. - CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY = cydriver.CUgraphInstantiate_flags_enum.CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY{{endif}} + CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY = ( + cydriver.CUgraphInstantiate_flags_enum.CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY, + 'Run the graph using the per-node priority attributes rather than the\n' + 'priority of the stream it is launched into.\n' + ){{endif}} -_dict_CUgraphInstantiate_flags = dict(((int(v), v) for k, v in CUgraphInstantiate_flags.__members__.items())) {{endif}} {{if 'CUdeviceNumaConfig_enum' in found_types}} -class CUdeviceNumaConfig(IntEnum): +class CUdeviceNumaConfig(_FastEnum): """ CUDA device NUMA configuration """ {{if 'CU_DEVICE_NUMA_CONFIG_NONE' in found_values}} - #: The GPU is not a NUMA node - CU_DEVICE_NUMA_CONFIG_NONE = cydriver.CUdeviceNumaConfig_enum.CU_DEVICE_NUMA_CONFIG_NONE{{endif}} + CU_DEVICE_NUMA_CONFIG_NONE = ( + cydriver.CUdeviceNumaConfig_enum.CU_DEVICE_NUMA_CONFIG_NONE, + 'The GPU is not a NUMA node\n' + ){{endif}} {{if 'CU_DEVICE_NUMA_CONFIG_NUMA_NODE' in found_values}} - #: The GPU is a NUMA node, CU_DEVICE_ATTRIBUTE_NUMA_ID contains its - #: NUMA ID - CU_DEVICE_NUMA_CONFIG_NUMA_NODE = cydriver.CUdeviceNumaConfig_enum.CU_DEVICE_NUMA_CONFIG_NUMA_NODE{{endif}} + CU_DEVICE_NUMA_CONFIG_NUMA_NODE = ( + cydriver.CUdeviceNumaConfig_enum.CU_DEVICE_NUMA_CONFIG_NUMA_NODE, + 'The GPU is a NUMA node, CU_DEVICE_ATTRIBUTE_NUMA_ID contains its NUMA ID\n' + ){{endif}} -_dict_CUdeviceNumaConfig = dict(((int(v), v) for k, v in CUdeviceNumaConfig.__members__.items())) {{endif}} {{if 'CUprocessState_enum' in found_types}} -class CUprocessState(IntEnum): +class CUprocessState(_FastEnum): """ CUDA Process States """ {{if 'CU_PROCESS_STATE_RUNNING' in found_values}} - #: Default process state - CU_PROCESS_STATE_RUNNING = cydriver.CUprocessState_enum.CU_PROCESS_STATE_RUNNING{{endif}} + CU_PROCESS_STATE_RUNNING = ( + cydriver.CUprocessState_enum.CU_PROCESS_STATE_RUNNING, + 'Default process state\n' + ){{endif}} {{if 'CU_PROCESS_STATE_LOCKED' in found_values}} - #: CUDA API locks are taken so further CUDA API calls will block - CU_PROCESS_STATE_LOCKED = cydriver.CUprocessState_enum.CU_PROCESS_STATE_LOCKED{{endif}} + CU_PROCESS_STATE_LOCKED = ( + cydriver.CUprocessState_enum.CU_PROCESS_STATE_LOCKED, + 'CUDA API locks are taken so further CUDA API calls will block\n' + ){{endif}} {{if 'CU_PROCESS_STATE_CHECKPOINTED' in found_values}} - #: Application memory contents have been checkpointed and underlying - #: allocations and device handles have been released - CU_PROCESS_STATE_CHECKPOINTED = cydriver.CUprocessState_enum.CU_PROCESS_STATE_CHECKPOINTED{{endif}} + CU_PROCESS_STATE_CHECKPOINTED = ( + cydriver.CUprocessState_enum.CU_PROCESS_STATE_CHECKPOINTED, + 'Application memory contents have been checkpointed and underlying\n' + 'allocations and device handles have been released\n' + ){{endif}} {{if 'CU_PROCESS_STATE_FAILED' in found_values}} - #: Application entered an uncorrectable error during the - #: checkpoint/restore process - CU_PROCESS_STATE_FAILED = cydriver.CUprocessState_enum.CU_PROCESS_STATE_FAILED{{endif}} + CU_PROCESS_STATE_FAILED = ( + cydriver.CUprocessState_enum.CU_PROCESS_STATE_FAILED, + 'Application entered an uncorrectable error during the checkpoint/restore\n' + 'process\n' + ){{endif}} -_dict_CUprocessState = dict(((int(v), v) for k, v in CUprocessState.__members__.items())) {{endif}} {{if 'CUmoduleLoadingMode_enum' in found_types}} -class CUmoduleLoadingMode(IntEnum): +class CUmoduleLoadingMode(_FastEnum): """ CUDA Lazy Loading status """ {{if 'CU_MODULE_EAGER_LOADING' in found_values}} - #: Lazy Kernel Loading is not enabled - CU_MODULE_EAGER_LOADING = cydriver.CUmoduleLoadingMode_enum.CU_MODULE_EAGER_LOADING{{endif}} + CU_MODULE_EAGER_LOADING = ( + cydriver.CUmoduleLoadingMode_enum.CU_MODULE_EAGER_LOADING, + 'Lazy Kernel Loading is not enabled\n' + ){{endif}} {{if 'CU_MODULE_LAZY_LOADING' in found_values}} - #: Lazy Kernel Loading is enabled - CU_MODULE_LAZY_LOADING = cydriver.CUmoduleLoadingMode_enum.CU_MODULE_LAZY_LOADING{{endif}} + CU_MODULE_LAZY_LOADING = ( + cydriver.CUmoduleLoadingMode_enum.CU_MODULE_LAZY_LOADING, + 'Lazy Kernel Loading is enabled\n' + ){{endif}} -_dict_CUmoduleLoadingMode = dict(((int(v), v) for k, v in CUmoduleLoadingMode.__members__.items())) {{endif}} {{if 'CUmemDecompressAlgorithm_enum' in found_types}} -class CUmemDecompressAlgorithm(IntEnum): +class CUmemDecompressAlgorithm(_FastEnum): """ Bitmasks for CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_ALGORITHM_MASK. """ {{if 'CU_MEM_DECOMPRESS_UNSUPPORTED' in found_values}} - #: Decompression is unsupported. - CU_MEM_DECOMPRESS_UNSUPPORTED = cydriver.CUmemDecompressAlgorithm_enum.CU_MEM_DECOMPRESS_UNSUPPORTED{{endif}} + CU_MEM_DECOMPRESS_UNSUPPORTED = ( + cydriver.CUmemDecompressAlgorithm_enum.CU_MEM_DECOMPRESS_UNSUPPORTED, + 'Decompression is unsupported.\n' + ){{endif}} {{if 'CU_MEM_DECOMPRESS_ALGORITHM_DEFLATE' in found_values}} - #: Deflate is supported. - CU_MEM_DECOMPRESS_ALGORITHM_DEFLATE = cydriver.CUmemDecompressAlgorithm_enum.CU_MEM_DECOMPRESS_ALGORITHM_DEFLATE{{endif}} + CU_MEM_DECOMPRESS_ALGORITHM_DEFLATE = ( + cydriver.CUmemDecompressAlgorithm_enum.CU_MEM_DECOMPRESS_ALGORITHM_DEFLATE, + 'Deflate is supported.\n' + ){{endif}} {{if 'CU_MEM_DECOMPRESS_ALGORITHM_SNAPPY' in found_values}} - #: Snappy is supported. - CU_MEM_DECOMPRESS_ALGORITHM_SNAPPY = cydriver.CUmemDecompressAlgorithm_enum.CU_MEM_DECOMPRESS_ALGORITHM_SNAPPY{{endif}} + CU_MEM_DECOMPRESS_ALGORITHM_SNAPPY = ( + cydriver.CUmemDecompressAlgorithm_enum.CU_MEM_DECOMPRESS_ALGORITHM_SNAPPY, + 'Snappy is supported.\n' + ){{endif}} {{if 'CU_MEM_DECOMPRESS_ALGORITHM_LZ4' in found_values}} - #: LZ4 is supported. - CU_MEM_DECOMPRESS_ALGORITHM_LZ4 = cydriver.CUmemDecompressAlgorithm_enum.CU_MEM_DECOMPRESS_ALGORITHM_LZ4{{endif}} + CU_MEM_DECOMPRESS_ALGORITHM_LZ4 = ( + cydriver.CUmemDecompressAlgorithm_enum.CU_MEM_DECOMPRESS_ALGORITHM_LZ4, + 'LZ4 is supported.\n' + ){{endif}} -_dict_CUmemDecompressAlgorithm = dict(((int(v), v) for k, v in CUmemDecompressAlgorithm.__members__.items())) {{endif}} {{if 'CUfunctionLoadingState_enum' in found_types}} -class CUfunctionLoadingState(IntEnum): +class CUfunctionLoadingState(_FastEnum): """ """ @@ -5424,11 +6743,10 @@ class CUfunctionLoadingState(IntEnum): {{if 'CU_FUNCTION_LOADING_STATE_MAX' in found_values}} CU_FUNCTION_LOADING_STATE_MAX = cydriver.CUfunctionLoadingState_enum.CU_FUNCTION_LOADING_STATE_MAX{{endif}} -_dict_CUfunctionLoadingState = dict(((int(v), v) for k, v in CUfunctionLoadingState.__members__.items())) {{endif}} {{if 'CUcoredumpSettings_enum' in found_types}} -class CUcoredumpSettings(IntEnum): +class CUcoredumpSettings(_FastEnum): """ Flags for choosing a coredump attribute to get/set """ @@ -5449,11 +6767,10 @@ class CUcoredumpSettings(IntEnum): {{if 'CU_COREDUMP_MAX' in found_values}} CU_COREDUMP_MAX = cydriver.CUcoredumpSettings_enum.CU_COREDUMP_MAX{{endif}} -_dict_CUcoredumpSettings = dict(((int(v), v) for k, v in CUcoredumpSettings.__members__.items())) {{endif}} {{if 'CUCoredumpGenerationFlags' in found_types}} -class CUCoredumpGenerationFlags(IntEnum): +class CUCoredumpGenerationFlags(_FastEnum): """ Flags for controlling coredump contents """ @@ -5476,24 +6793,24 @@ class CUCoredumpGenerationFlags(IntEnum): {{if 'CU_COREDUMP_GZIP_COMPRESS' in found_values}} CU_COREDUMP_GZIP_COMPRESS = cydriver.CUCoredumpGenerationFlags.CU_COREDUMP_GZIP_COMPRESS{{endif}} -_dict_CUCoredumpGenerationFlags = dict(((int(v), v) for k, v in CUCoredumpGenerationFlags.__members__.items())) {{endif}} {{if 'CUgreenCtxCreate_flags' in found_types}} -class CUgreenCtxCreate_flags(IntEnum): +class CUgreenCtxCreate_flags(_FastEnum): """ """ {{if 'CU_GREEN_CTX_DEFAULT_STREAM' in found_values}} - #: Required. Creates a default stream to use inside the green context - CU_GREEN_CTX_DEFAULT_STREAM = cydriver.CUgreenCtxCreate_flags.CU_GREEN_CTX_DEFAULT_STREAM{{endif}} + CU_GREEN_CTX_DEFAULT_STREAM = ( + cydriver.CUgreenCtxCreate_flags.CU_GREEN_CTX_DEFAULT_STREAM, + 'Required. Creates a default stream to use inside the green context\n' + ){{endif}} -_dict_CUgreenCtxCreate_flags = dict(((int(v), v) for k, v in CUgreenCtxCreate_flags.__members__.items())) {{endif}} {{if 'CUdevSmResourceGroup_flags' in found_types}} -class CUdevSmResourceGroup_flags(IntEnum): +class CUdevSmResourceGroup_flags(_FastEnum): """ """ @@ -5502,11 +6819,10 @@ class CUdevSmResourceGroup_flags(IntEnum): {{if 'CU_DEV_SM_RESOURCE_GROUP_BACKFILL' in found_values}} CU_DEV_SM_RESOURCE_GROUP_BACKFILL = cydriver.CUdevSmResourceGroup_flags.CU_DEV_SM_RESOURCE_GROUP_BACKFILL{{endif}} -_dict_CUdevSmResourceGroup_flags = dict(((int(v), v) for k, v in CUdevSmResourceGroup_flags.__members__.items())) {{endif}} {{if 'CUdevSmResourceSplitByCount_flags' in found_types}} -class CUdevSmResourceSplitByCount_flags(IntEnum): +class CUdevSmResourceSplitByCount_flags(_FastEnum): """ """ @@ -5515,11 +6831,10 @@ class CUdevSmResourceSplitByCount_flags(IntEnum): {{if 'CU_DEV_SM_RESOURCE_SPLIT_MAX_POTENTIAL_CLUSTER_SIZE' in found_values}} CU_DEV_SM_RESOURCE_SPLIT_MAX_POTENTIAL_CLUSTER_SIZE = cydriver.CUdevSmResourceSplitByCount_flags.CU_DEV_SM_RESOURCE_SPLIT_MAX_POTENTIAL_CLUSTER_SIZE{{endif}} -_dict_CUdevSmResourceSplitByCount_flags = dict(((int(v), v) for k, v in CUdevSmResourceSplitByCount_flags.__members__.items())) {{endif}} {{if 'CUdevResourceType' in found_types}} -class CUdevResourceType(IntEnum): +class CUdevResourceType(_FastEnum): """ Type of resource """ @@ -5527,41 +6842,49 @@ class CUdevResourceType(IntEnum): CU_DEV_RESOURCE_TYPE_INVALID = cydriver.CUdevResourceType.CU_DEV_RESOURCE_TYPE_INVALID{{endif}} {{if 'CU_DEV_RESOURCE_TYPE_SM' in found_values}} - #: Streaming multiprocessors related information - CU_DEV_RESOURCE_TYPE_SM = cydriver.CUdevResourceType.CU_DEV_RESOURCE_TYPE_SM{{endif}} + CU_DEV_RESOURCE_TYPE_SM = ( + cydriver.CUdevResourceType.CU_DEV_RESOURCE_TYPE_SM, + 'Streaming multiprocessors related information\n' + ){{endif}} {{if 'CU_DEV_RESOURCE_TYPE_WORKQUEUE_CONFIG' in found_values}} - #: Workqueue configuration related information - CU_DEV_RESOURCE_TYPE_WORKQUEUE_CONFIG = cydriver.CUdevResourceType.CU_DEV_RESOURCE_TYPE_WORKQUEUE_CONFIG{{endif}} + CU_DEV_RESOURCE_TYPE_WORKQUEUE_CONFIG = ( + cydriver.CUdevResourceType.CU_DEV_RESOURCE_TYPE_WORKQUEUE_CONFIG, + 'Workqueue configuration related information\n' + ){{endif}} {{if 'CU_DEV_RESOURCE_TYPE_WORKQUEUE' in found_values}} - #: Pre-existing workqueue related information - CU_DEV_RESOURCE_TYPE_WORKQUEUE = cydriver.CUdevResourceType.CU_DEV_RESOURCE_TYPE_WORKQUEUE{{endif}} + CU_DEV_RESOURCE_TYPE_WORKQUEUE = ( + cydriver.CUdevResourceType.CU_DEV_RESOURCE_TYPE_WORKQUEUE, + 'Pre-existing workqueue related information\n' + ){{endif}} -_dict_CUdevResourceType = dict(((int(v), v) for k, v in CUdevResourceType.__members__.items())) {{endif}} {{if 'CUdevWorkqueueConfigScope' in found_types}} -class CUdevWorkqueueConfigScope(IntEnum): +class CUdevWorkqueueConfigScope(_FastEnum): """ Sharing scope for workqueues """ {{if 'CU_WORKQUEUE_SCOPE_DEVICE_CTX' in found_values}} - #: Use all shared workqueue resources across all contexts. Default - #: driver behaviour. - CU_WORKQUEUE_SCOPE_DEVICE_CTX = cydriver.CUdevWorkqueueConfigScope.CU_WORKQUEUE_SCOPE_DEVICE_CTX{{endif}} + CU_WORKQUEUE_SCOPE_DEVICE_CTX = ( + cydriver.CUdevWorkqueueConfigScope.CU_WORKQUEUE_SCOPE_DEVICE_CTX, + 'Use all shared workqueue resources across all contexts. Default driver\n' + 'behaviour.\n' + ){{endif}} {{if 'CU_WORKQUEUE_SCOPE_GREEN_CTX_BALANCED' in found_values}} - #: When possible, use non-overlapping workqueue resources with other - #: balanced green contexts. - CU_WORKQUEUE_SCOPE_GREEN_CTX_BALANCED = cydriver.CUdevWorkqueueConfigScope.CU_WORKQUEUE_SCOPE_GREEN_CTX_BALANCED{{endif}} + CU_WORKQUEUE_SCOPE_GREEN_CTX_BALANCED = ( + cydriver.CUdevWorkqueueConfigScope.CU_WORKQUEUE_SCOPE_GREEN_CTX_BALANCED, + 'When possible, use non-overlapping workqueue resources with other balanced\n' + 'green contexts.\n' + ){{endif}} -_dict_CUdevWorkqueueConfigScope = dict(((int(v), v) for k, v in CUdevWorkqueueConfigScope.__members__.items())) {{endif}} {{if 'CUlogLevel_enum' in found_types}} -class CUlogLevel(IntEnum): +class CUlogLevel(_FastEnum): """ """ @@ -5570,45 +6893,50 @@ class CUlogLevel(IntEnum): {{if 'CU_LOG_LEVEL_WARNING' in found_values}} CU_LOG_LEVEL_WARNING = cydriver.CUlogLevel_enum.CU_LOG_LEVEL_WARNING{{endif}} -_dict_CUlogLevel = dict(((int(v), v) for k, v in CUlogLevel.__members__.items())) {{endif}} {{if 'CUoutput_mode_enum' in found_types}} -class CUoutput_mode(IntEnum): +class CUoutput_mode(_FastEnum): """ Profiler Output Modes """ {{if 'CU_OUT_KEY_VALUE_PAIR' in found_values}} - #: Output mode Key-Value pair format. - CU_OUT_KEY_VALUE_PAIR = cydriver.CUoutput_mode_enum.CU_OUT_KEY_VALUE_PAIR{{endif}} + CU_OUT_KEY_VALUE_PAIR = ( + cydriver.CUoutput_mode_enum.CU_OUT_KEY_VALUE_PAIR, + 'Output mode Key-Value pair format.\n' + ){{endif}} {{if 'CU_OUT_CSV' in found_values}} - #: Output mode Comma separated values format. - CU_OUT_CSV = cydriver.CUoutput_mode_enum.CU_OUT_CSV{{endif}} + CU_OUT_CSV = ( + cydriver.CUoutput_mode_enum.CU_OUT_CSV, + 'Output mode Comma separated values format.\n' + ){{endif}} -_dict_CUoutput_mode = dict(((int(v), v) for k, v in CUoutput_mode.__members__.items())) {{endif}} {{if True}} -class CUeglFrameType(IntEnum): +class CUeglFrameType(_FastEnum): """ CUDA EglFrame type - array or pointer """ {{if True}} - #: Frame type CUDA array - CU_EGL_FRAME_TYPE_ARRAY = cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY{{endif}} + CU_EGL_FRAME_TYPE_ARRAY = ( + cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_ARRAY, + 'Frame type CUDA array\n' + ){{endif}} {{if True}} - #: Frame type pointer - CU_EGL_FRAME_TYPE_PITCH = cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH{{endif}} + CU_EGL_FRAME_TYPE_PITCH = ( + cydriver.CUeglFrameType_enum.CU_EGL_FRAME_TYPE_PITCH, + 'Frame type pointer\n' + ){{endif}} -_dict_CUeglFrameType = dict(((int(v), v) for k, v in CUeglFrameType.__members__.items())) {{endif}} {{if True}} -class CUeglResourceLocationFlags(IntEnum): +class CUeglResourceLocationFlags(_FastEnum): """ Resource location flags- sysmem or vidmem For CUDA context on iGPU, since video and system memory are equivalent - these flags @@ -5624,18 +6952,21 @@ class CUeglResourceLocationFlags(IntEnum): """ {{if True}} - #: Resource location sysmem - CU_EGL_RESOURCE_LOCATION_SYSMEM = cydriver.CUeglResourceLocationFlags_enum.CU_EGL_RESOURCE_LOCATION_SYSMEM{{endif}} + CU_EGL_RESOURCE_LOCATION_SYSMEM = ( + cydriver.CUeglResourceLocationFlags_enum.CU_EGL_RESOURCE_LOCATION_SYSMEM, + 'Resource location sysmem\n' + ){{endif}} {{if True}} - #: Resource location vidmem - CU_EGL_RESOURCE_LOCATION_VIDMEM = cydriver.CUeglResourceLocationFlags_enum.CU_EGL_RESOURCE_LOCATION_VIDMEM{{endif}} + CU_EGL_RESOURCE_LOCATION_VIDMEM = ( + cydriver.CUeglResourceLocationFlags_enum.CU_EGL_RESOURCE_LOCATION_VIDMEM, + 'Resource location vidmem\n' + ){{endif}} -_dict_CUeglResourceLocationFlags = dict(((int(v), v) for k, v in CUeglResourceLocationFlags.__members__.items())) {{endif}} {{if True}} -class CUeglColorFormat(IntEnum): +class CUeglColorFormat(_FastEnum): """ CUDA EGL Color Format - The different planar and multiplanar formats currently supported for CUDA_EGL interops. Three channel @@ -5644,601 +6975,822 @@ class CUeglColorFormat(IntEnum): """ {{if True}} - #: Y, U, V in three surfaces, each in a separate surface, U/V width = - #: 1/2 Y width, U/V height = 1/2 Y height. - CU_EGL_COLOR_FORMAT_YUV420_PLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR{{endif}} + CU_EGL_COLOR_FORMAT_YUV420_PLANAR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR, + 'Y, U, V in three surfaces, each in a separate surface, U/V width = 1/2 Y\n' + 'width, U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Y, UV in two surfaces (UV as one surface) with VU byte ordering, - #: width, height ratio same as YUV420Planar. - CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR{{endif}} + CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR, + 'Y, UV in two surfaces (UV as one surface) with VU byte ordering, width,\n' + 'height ratio same as YUV420Planar.\n' + ){{endif}} {{if True}} - #: Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V - #: height = Y height. - CU_EGL_COLOR_FORMAT_YUV422_PLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR{{endif}} + CU_EGL_COLOR_FORMAT_YUV422_PLANAR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR, + 'Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V height = Y\n' + 'height.\n' + ){{endif}} {{if True}} - #: Y, UV in two surfaces with VU byte ordering, width, height ratio - #: same as YUV422Planar. - CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR{{endif}} + CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR, + 'Y, UV in two surfaces with VU byte ordering, width, height ratio same as\n' + 'YUV422Planar.\n' + ){{endif}} {{if True}} - #: R/G/B three channels in one surface with BGR byte ordering. Only - #: pitch linear format supported. - CU_EGL_COLOR_FORMAT_RGB = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGB{{endif}} + CU_EGL_COLOR_FORMAT_RGB = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGB, + 'R/G/B three channels in one surface with BGR byte ordering. Only pitch\n' + 'linear format supported.\n' + ){{endif}} {{if True}} - #: R/G/B three channels in one surface with RGB byte ordering. Only - #: pitch linear format supported. - CU_EGL_COLOR_FORMAT_BGR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGR{{endif}} + CU_EGL_COLOR_FORMAT_BGR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGR, + 'R/G/B three channels in one surface with RGB byte ordering. Only pitch\n' + 'linear format supported.\n' + ){{endif}} {{if True}} - #: R/G/B/A four channels in one surface with BGRA byte ordering. - CU_EGL_COLOR_FORMAT_ARGB = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB{{endif}} + CU_EGL_COLOR_FORMAT_ARGB = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB, + 'R/G/B/A four channels in one surface with BGRA byte ordering.\n' + ){{endif}} {{if True}} - #: R/G/B/A four channels in one surface with ABGR byte ordering. - CU_EGL_COLOR_FORMAT_RGBA = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA{{endif}} + CU_EGL_COLOR_FORMAT_RGBA = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA, + 'R/G/B/A four channels in one surface with ABGR byte ordering.\n' + ){{endif}} {{if True}} - #: single luminance channel in one surface. - CU_EGL_COLOR_FORMAT_L = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L{{endif}} + CU_EGL_COLOR_FORMAT_L = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_L, + 'single luminance channel in one surface.\n' + ){{endif}} {{if True}} - #: single color channel in one surface. - CU_EGL_COLOR_FORMAT_R = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R{{endif}} + CU_EGL_COLOR_FORMAT_R = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_R, + 'single color channel in one surface.\n' + ){{endif}} {{if True}} - #: Y, U, V in three surfaces, each in a separate surface, U/V width = Y - #: width, U/V height = Y height. - CU_EGL_COLOR_FORMAT_YUV444_PLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR{{endif}} + CU_EGL_COLOR_FORMAT_YUV444_PLANAR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR, + 'Y, U, V in three surfaces, each in a separate surface, U/V width = Y width,\n' + 'U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Y, UV in two surfaces (UV as one surface) with VU byte ordering, - #: width, height ratio same as YUV444Planar. - CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR{{endif}} + CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR, + 'Y, UV in two surfaces (UV as one surface) with VU byte ordering, width,\n' + 'height ratio same as YUV444Planar.\n' + ){{endif}} {{if True}} - #: Y, U, V in one surface, interleaved as UYVY in one channel. - CU_EGL_COLOR_FORMAT_YUYV_422 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422{{endif}} + CU_EGL_COLOR_FORMAT_YUYV_422 = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422, + 'Y, U, V in one surface, interleaved as UYVY in one channel.\n' + ){{endif}} {{if True}} - #: Y, U, V in one surface, interleaved as YUYV in one channel. - CU_EGL_COLOR_FORMAT_UYVY_422 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422{{endif}} + CU_EGL_COLOR_FORMAT_UYVY_422 = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422, + 'Y, U, V in one surface, interleaved as YUYV in one channel.\n' + ){{endif}} {{if True}} - #: R/G/B/A four channels in one surface with RGBA byte ordering. - CU_EGL_COLOR_FORMAT_ABGR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR{{endif}} + CU_EGL_COLOR_FORMAT_ABGR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ABGR, + 'R/G/B/A four channels in one surface with RGBA byte ordering.\n' + ){{endif}} {{if True}} - #: R/G/B/A four channels in one surface with ARGB byte ordering. - CU_EGL_COLOR_FORMAT_BGRA = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA{{endif}} + CU_EGL_COLOR_FORMAT_BGRA = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BGRA, + 'R/G/B/A four channels in one surface with ARGB byte ordering.\n' + ){{endif}} {{if True}} - #: Alpha color format - one channel in one surface. - CU_EGL_COLOR_FORMAT_A = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A{{endif}} + CU_EGL_COLOR_FORMAT_A = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_A, + 'Alpha color format - one channel in one surface.\n' + ){{endif}} {{if True}} - #: R/G color format - two channels in one surface with GR byte ordering - CU_EGL_COLOR_FORMAT_RG = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG{{endif}} + CU_EGL_COLOR_FORMAT_RG = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RG, + 'R/G color format - two channels in one surface with GR byte ordering\n' + ){{endif}} {{if True}} - #: Y, U, V, A four channels in one surface, interleaved as VUYA. - CU_EGL_COLOR_FORMAT_AYUV = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV{{endif}} + CU_EGL_COLOR_FORMAT_AYUV = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV, + 'Y, U, V, A four channels in one surface, interleaved as VUYA.\n' + ){{endif}} {{if True}} - #: Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V - #: width = Y width, U/V height = Y height. - CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR{{endif}} + CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR, + 'Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width\n' + '= Y width, U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V - #: width = 1/2 Y width, U/V height = Y height. - CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR{{endif}} + CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR, + 'Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width\n' + '= 1/2 Y width, U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V - #: width = 1/2 Y width, U/V height = 1/2 Y height. - CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR{{endif}} + CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR, + 'Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width\n' + '= 1/2 Y width, U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Y10, V10U10 in two surfaces (VU as one surface) with UV byte - #: ordering, U/V width = Y width, U/V height = Y height. - CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR{{endif}} + CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR, + 'Y10, V10U10 in two surfaces (VU as one surface) with UV byte ordering, U/V\n' + 'width = Y width, U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Y10, V10U10 in two surfaces (VU as one surface) with UV byte - #: ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. - CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR{{endif}} + CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR, + 'Y10, V10U10 in two surfaces (VU as one surface) with UV byte ordering, U/V\n' + 'width = 1/2 Y width, U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Y12, V12U12 in two surfaces (VU as one surface) with UV byte - #: ordering, U/V width = Y width, U/V height = Y height. - CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR{{endif}} + CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR, + 'Y12, V12U12 in two surfaces (VU as one surface) with UV byte ordering, U/V\n' + 'width = Y width, U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Y12, V12U12 in two surfaces (VU as one surface) with UV byte - #: ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. - CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR{{endif}} + CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR, + 'Y12, V12U12 in two surfaces (VU as one surface) with UV byte ordering, U/V\n' + 'width = 1/2 Y width, U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y, U, V in one surface, interleaved as YVYU in one - #: channel. - CU_EGL_COLOR_FORMAT_VYUY_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER{{endif}} + CU_EGL_COLOR_FORMAT_VYUY_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY_ER, + 'Extended Range Y, U, V in one surface, interleaved as YVYU in one channel.\n' + ){{endif}} {{if True}} - #: Extended Range Y, U, V in one surface, interleaved as YUYV in one - #: channel. - CU_EGL_COLOR_FORMAT_UYVY_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER{{endif}} + CU_EGL_COLOR_FORMAT_UYVY_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_ER, + 'Extended Range Y, U, V in one surface, interleaved as YUYV in one channel.\n' + ){{endif}} {{if True}} - #: Extended Range Y, U, V in one surface, interleaved as UYVY in one - #: channel. - CU_EGL_COLOR_FORMAT_YUYV_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER{{endif}} + CU_EGL_COLOR_FORMAT_YUYV_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_ER, + 'Extended Range Y, U, V in one surface, interleaved as UYVY in one channel.\n' + ){{endif}} {{if True}} - #: Extended Range Y, U, V in one surface, interleaved as VYUY in one - #: channel. - CU_EGL_COLOR_FORMAT_YVYU_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER{{endif}} + CU_EGL_COLOR_FORMAT_YVYU_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU_ER, + 'Extended Range Y, U, V in one surface, interleaved as VYUY in one channel.\n' + ){{endif}} {{if True}} - #: Extended Range Y, U, V three channels in one surface, interleaved as - #: VUY. Only pitch linear format supported. - CU_EGL_COLOR_FORMAT_YUV_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV_ER{{endif}} + CU_EGL_COLOR_FORMAT_YUV_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV_ER, + 'Extended Range Y, U, V three channels in one surface, interleaved as VUY.\n' + 'Only pitch linear format supported.\n' + ){{endif}} {{if True}} - #: Extended Range Y, U, V, A four channels in one surface, interleaved - #: as AVUY. - CU_EGL_COLOR_FORMAT_YUVA_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER{{endif}} + CU_EGL_COLOR_FORMAT_YUVA_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA_ER, + 'Extended Range Y, U, V, A four channels in one surface, interleaved as\n' + 'AVUY.\n' + ){{endif}} {{if True}} - #: Extended Range Y, U, V, A four channels in one surface, interleaved - #: as VUYA. - CU_EGL_COLOR_FORMAT_AYUV_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER{{endif}} + CU_EGL_COLOR_FORMAT_AYUV_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_AYUV_ER, + 'Extended Range Y, U, V, A four channels in one surface, interleaved as\n' + 'VUYA.\n' + ){{endif}} {{if True}} - #: Extended Range Y, U, V in three surfaces, U/V width = Y width, U/V - #: height = Y height. - CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER{{endif}} + CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER, + 'Extended Range Y, U, V in three surfaces, U/V width = Y width, U/V height =\n' + 'Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y, U, V in three surfaces, U/V width = 1/2 Y width, - #: U/V height = Y height. - CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER{{endif}} + CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER, + 'Extended Range Y, U, V in three surfaces, U/V width = 1/2 Y width, U/V\n' + 'height = Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y, U, V in three surfaces, U/V width = 1/2 Y width, - #: U/V height = 1/2 Y height. - CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER{{endif}} + CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER, + 'Extended Range Y, U, V in three surfaces, U/V width = 1/2 Y width, U/V\n' + 'height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y, UV in two surfaces (UV as one surface) with VU - #: byte ordering, U/V width = Y width, U/V height = Y height. - CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER{{endif}} + CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER, + 'Extended Range Y, UV in two surfaces (UV as one surface) with VU byte\n' + 'ordering, U/V width = Y width, U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y, UV in two surfaces (UV as one surface) with VU - #: byte ordering, U/V width = 1/2 Y width, U/V height = Y height. - CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER{{endif}} + CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER, + 'Extended Range Y, UV in two surfaces (UV as one surface) with VU byte\n' + 'ordering, U/V width = 1/2 Y width, U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y, UV in two surfaces (UV as one surface) with VU - #: byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. - CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER{{endif}} + CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER, + 'Extended Range Y, UV in two surfaces (UV as one surface) with VU byte\n' + 'ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y, V, U in three surfaces, U/V width = Y width, U/V - #: height = Y height. - CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER{{endif}} + CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER, + 'Extended Range Y, V, U in three surfaces, U/V width = Y width, U/V height =\n' + 'Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y, V, U in three surfaces, U/V width = 1/2 Y width, - #: U/V height = Y height. - CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER{{endif}} + CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER, + 'Extended Range Y, V, U in three surfaces, U/V width = 1/2 Y width, U/V\n' + 'height = Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y, V, U in three surfaces, U/V width = 1/2 Y width, - #: U/V height = 1/2 Y height. - CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER{{endif}} + CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER, + 'Extended Range Y, V, U in three surfaces, U/V width = 1/2 Y width, U/V\n' + 'height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y, VU in two surfaces (VU as one surface) with UV - #: byte ordering, U/V width = Y width, U/V height = Y height. - CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER{{endif}} + CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER, + 'Extended Range Y, VU in two surfaces (VU as one surface) with UV byte\n' + 'ordering, U/V width = Y width, U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y, VU in two surfaces (VU as one surface) with UV - #: byte ordering, U/V width = 1/2 Y width, U/V height = Y height. - CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER{{endif}} + CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER, + 'Extended Range Y, VU in two surfaces (VU as one surface) with UV byte\n' + 'ordering, U/V width = 1/2 Y width, U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y, VU in two surfaces (VU as one surface) with UV - #: byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. - CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER{{endif}} + CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER, + 'Extended Range Y, VU in two surfaces (VU as one surface) with UV byte\n' + 'ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Bayer format - one channel in one surface with interleaved RGGB - #: ordering. - CU_EGL_COLOR_FORMAT_BAYER_RGGB = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB{{endif}} + CU_EGL_COLOR_FORMAT_BAYER_RGGB = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RGGB, + 'Bayer format - one channel in one surface with interleaved RGGB ordering.\n' + ){{endif}} {{if True}} - #: Bayer format - one channel in one surface with interleaved BGGR - #: ordering. - CU_EGL_COLOR_FORMAT_BAYER_BGGR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR{{endif}} + CU_EGL_COLOR_FORMAT_BAYER_BGGR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BGGR, + 'Bayer format - one channel in one surface with interleaved BGGR ordering.\n' + ){{endif}} {{if True}} - #: Bayer format - one channel in one surface with interleaved GRBG - #: ordering. - CU_EGL_COLOR_FORMAT_BAYER_GRBG = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG{{endif}} + CU_EGL_COLOR_FORMAT_BAYER_GRBG = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GRBG, + 'Bayer format - one channel in one surface with interleaved GRBG ordering.\n' + ){{endif}} {{if True}} - #: Bayer format - one channel in one surface with interleaved GBRG - #: ordering. - CU_EGL_COLOR_FORMAT_BAYER_GBRG = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG{{endif}} + CU_EGL_COLOR_FORMAT_BAYER_GBRG = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_GBRG, + 'Bayer format - one channel in one surface with interleaved GBRG ordering.\n' + ){{endif}} {{if True}} - #: Bayer10 format - one channel in one surface with interleaved RGGB - #: ordering. Out of 16 bits, 10 bits used 6 bits No-op. - CU_EGL_COLOR_FORMAT_BAYER10_RGGB = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB{{endif}} + CU_EGL_COLOR_FORMAT_BAYER10_RGGB = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_RGGB, + 'Bayer10 format - one channel in one surface with interleaved RGGB ordering.\n' + 'Out of 16 bits, 10 bits used 6 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer10 format - one channel in one surface with interleaved BGGR - #: ordering. Out of 16 bits, 10 bits used 6 bits No-op. - CU_EGL_COLOR_FORMAT_BAYER10_BGGR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR{{endif}} + CU_EGL_COLOR_FORMAT_BAYER10_BGGR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_BGGR, + 'Bayer10 format - one channel in one surface with interleaved BGGR ordering.\n' + 'Out of 16 bits, 10 bits used 6 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer10 format - one channel in one surface with interleaved GRBG - #: ordering. Out of 16 bits, 10 bits used 6 bits No-op. - CU_EGL_COLOR_FORMAT_BAYER10_GRBG = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG{{endif}} + CU_EGL_COLOR_FORMAT_BAYER10_GRBG = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GRBG, + 'Bayer10 format - one channel in one surface with interleaved GRBG ordering.\n' + 'Out of 16 bits, 10 bits used 6 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer10 format - one channel in one surface with interleaved GBRG - #: ordering. Out of 16 bits, 10 bits used 6 bits No-op. - CU_EGL_COLOR_FORMAT_BAYER10_GBRG = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG{{endif}} + CU_EGL_COLOR_FORMAT_BAYER10_GBRG = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_GBRG, + 'Bayer10 format - one channel in one surface with interleaved GBRG ordering.\n' + 'Out of 16 bits, 10 bits used 6 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer12 format - one channel in one surface with interleaved RGGB - #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. - CU_EGL_COLOR_FORMAT_BAYER12_RGGB = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB{{endif}} + CU_EGL_COLOR_FORMAT_BAYER12_RGGB = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RGGB, + 'Bayer12 format - one channel in one surface with interleaved RGGB ordering.\n' + 'Out of 16 bits, 12 bits used 4 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer12 format - one channel in one surface with interleaved BGGR - #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. - CU_EGL_COLOR_FORMAT_BAYER12_BGGR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR{{endif}} + CU_EGL_COLOR_FORMAT_BAYER12_BGGR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BGGR, + 'Bayer12 format - one channel in one surface with interleaved BGGR ordering.\n' + 'Out of 16 bits, 12 bits used 4 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer12 format - one channel in one surface with interleaved GRBG - #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. - CU_EGL_COLOR_FORMAT_BAYER12_GRBG = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG{{endif}} + CU_EGL_COLOR_FORMAT_BAYER12_GRBG = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GRBG, + 'Bayer12 format - one channel in one surface with interleaved GRBG ordering.\n' + 'Out of 16 bits, 12 bits used 4 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer12 format - one channel in one surface with interleaved GBRG - #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. - CU_EGL_COLOR_FORMAT_BAYER12_GBRG = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG{{endif}} + CU_EGL_COLOR_FORMAT_BAYER12_GBRG = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_GBRG, + 'Bayer12 format - one channel in one surface with interleaved GBRG ordering.\n' + 'Out of 16 bits, 12 bits used 4 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer14 format - one channel in one surface with interleaved RGGB - #: ordering. Out of 16 bits, 14 bits used 2 bits No-op. - CU_EGL_COLOR_FORMAT_BAYER14_RGGB = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB{{endif}} + CU_EGL_COLOR_FORMAT_BAYER14_RGGB = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_RGGB, + 'Bayer14 format - one channel in one surface with interleaved RGGB ordering.\n' + 'Out of 16 bits, 14 bits used 2 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer14 format - one channel in one surface with interleaved BGGR - #: ordering. Out of 16 bits, 14 bits used 2 bits No-op. - CU_EGL_COLOR_FORMAT_BAYER14_BGGR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR{{endif}} + CU_EGL_COLOR_FORMAT_BAYER14_BGGR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_BGGR, + 'Bayer14 format - one channel in one surface with interleaved BGGR ordering.\n' + 'Out of 16 bits, 14 bits used 2 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer14 format - one channel in one surface with interleaved GRBG - #: ordering. Out of 16 bits, 14 bits used 2 bits No-op. - CU_EGL_COLOR_FORMAT_BAYER14_GRBG = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG{{endif}} + CU_EGL_COLOR_FORMAT_BAYER14_GRBG = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GRBG, + 'Bayer14 format - one channel in one surface with interleaved GRBG ordering.\n' + 'Out of 16 bits, 14 bits used 2 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer14 format - one channel in one surface with interleaved GBRG - #: ordering. Out of 16 bits, 14 bits used 2 bits No-op. - CU_EGL_COLOR_FORMAT_BAYER14_GBRG = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG{{endif}} + CU_EGL_COLOR_FORMAT_BAYER14_GBRG = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER14_GBRG, + 'Bayer14 format - one channel in one surface with interleaved GBRG ordering.\n' + 'Out of 16 bits, 14 bits used 2 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer20 format - one channel in one surface with interleaved RGGB - #: ordering. Out of 32 bits, 20 bits used 12 bits No-op. - CU_EGL_COLOR_FORMAT_BAYER20_RGGB = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB{{endif}} + CU_EGL_COLOR_FORMAT_BAYER20_RGGB = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_RGGB, + 'Bayer20 format - one channel in one surface with interleaved RGGB ordering.\n' + 'Out of 32 bits, 20 bits used 12 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer20 format - one channel in one surface with interleaved BGGR - #: ordering. Out of 32 bits, 20 bits used 12 bits No-op. - CU_EGL_COLOR_FORMAT_BAYER20_BGGR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR{{endif}} + CU_EGL_COLOR_FORMAT_BAYER20_BGGR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_BGGR, + 'Bayer20 format - one channel in one surface with interleaved BGGR ordering.\n' + 'Out of 32 bits, 20 bits used 12 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer20 format - one channel in one surface with interleaved GRBG - #: ordering. Out of 32 bits, 20 bits used 12 bits No-op. - CU_EGL_COLOR_FORMAT_BAYER20_GRBG = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG{{endif}} + CU_EGL_COLOR_FORMAT_BAYER20_GRBG = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GRBG, + 'Bayer20 format - one channel in one surface with interleaved GRBG ordering.\n' + 'Out of 32 bits, 20 bits used 12 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer20 format - one channel in one surface with interleaved GBRG - #: ordering. Out of 32 bits, 20 bits used 12 bits No-op. - CU_EGL_COLOR_FORMAT_BAYER20_GBRG = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG{{endif}} + CU_EGL_COLOR_FORMAT_BAYER20_GBRG = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER20_GBRG, + 'Bayer20 format - one channel in one surface with interleaved GBRG ordering.\n' + 'Out of 32 bits, 20 bits used 12 bits No-op.\n' + ){{endif}} {{if True}} - #: Y, V, U in three surfaces, each in a separate surface, U/V width = Y - #: width, U/V height = Y height. - CU_EGL_COLOR_FORMAT_YVU444_PLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR{{endif}} + CU_EGL_COLOR_FORMAT_YVU444_PLANAR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU444_PLANAR, + 'Y, V, U in three surfaces, each in a separate surface, U/V width = Y width,\n' + 'U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Y, V, U in three surfaces, each in a separate surface, U/V width = - #: 1/2 Y width, U/V height = Y height. - CU_EGL_COLOR_FORMAT_YVU422_PLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR{{endif}} + CU_EGL_COLOR_FORMAT_YVU422_PLANAR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU422_PLANAR, + 'Y, V, U in three surfaces, each in a separate surface, U/V width = 1/2 Y\n' + 'width, U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Y, V, U in three surfaces, each in a separate surface, U/V width = - #: 1/2 Y width, U/V height = 1/2 Y height. - CU_EGL_COLOR_FORMAT_YVU420_PLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR{{endif}} + CU_EGL_COLOR_FORMAT_YVU420_PLANAR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR, + 'Y, V, U in three surfaces, each in a separate surface, U/V width = 1/2 Y\n' + 'width, U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Nvidia proprietary Bayer ISP format - one channel in one surface - #: with interleaved RGGB ordering and mapped to opaque integer - #: datatype. - CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB{{endif}} + CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB, + 'Nvidia proprietary Bayer ISP format - one channel in one surface with\n' + 'interleaved RGGB ordering and mapped to opaque integer datatype.\n' + ){{endif}} {{if True}} - #: Nvidia proprietary Bayer ISP format - one channel in one surface - #: with interleaved BGGR ordering and mapped to opaque integer - #: datatype. - CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR{{endif}} + CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR, + 'Nvidia proprietary Bayer ISP format - one channel in one surface with\n' + 'interleaved BGGR ordering and mapped to opaque integer datatype.\n' + ){{endif}} {{if True}} - #: Nvidia proprietary Bayer ISP format - one channel in one surface - #: with interleaved GRBG ordering and mapped to opaque integer - #: datatype. - CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG{{endif}} + CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG, + 'Nvidia proprietary Bayer ISP format - one channel in one surface with\n' + 'interleaved GRBG ordering and mapped to opaque integer datatype.\n' + ){{endif}} {{if True}} - #: Nvidia proprietary Bayer ISP format - one channel in one surface - #: with interleaved GBRG ordering and mapped to opaque integer - #: datatype. - CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG{{endif}} + CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG, + 'Nvidia proprietary Bayer ISP format - one channel in one surface with\n' + 'interleaved GBRG ordering and mapped to opaque integer datatype.\n' + ){{endif}} {{if True}} - #: Bayer format - one channel in one surface with interleaved BCCR - #: ordering. - CU_EGL_COLOR_FORMAT_BAYER_BCCR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR{{endif}} + CU_EGL_COLOR_FORMAT_BAYER_BCCR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_BCCR, + 'Bayer format - one channel in one surface with interleaved BCCR ordering.\n' + ){{endif}} {{if True}} - #: Bayer format - one channel in one surface with interleaved RCCB - #: ordering. - CU_EGL_COLOR_FORMAT_BAYER_RCCB = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB{{endif}} + CU_EGL_COLOR_FORMAT_BAYER_RCCB = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_RCCB, + 'Bayer format - one channel in one surface with interleaved RCCB ordering.\n' + ){{endif}} {{if True}} - #: Bayer format - one channel in one surface with interleaved CRBC - #: ordering. - CU_EGL_COLOR_FORMAT_BAYER_CRBC = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC{{endif}} + CU_EGL_COLOR_FORMAT_BAYER_CRBC = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CRBC, + 'Bayer format - one channel in one surface with interleaved CRBC ordering.\n' + ){{endif}} {{if True}} - #: Bayer format - one channel in one surface with interleaved CBRC - #: ordering. - CU_EGL_COLOR_FORMAT_BAYER_CBRC = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC{{endif}} + CU_EGL_COLOR_FORMAT_BAYER_CBRC = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER_CBRC, + 'Bayer format - one channel in one surface with interleaved CBRC ordering.\n' + ){{endif}} {{if True}} - #: Bayer10 format - one channel in one surface with interleaved CCCC - #: ordering. Out of 16 bits, 10 bits used 6 bits No-op. - CU_EGL_COLOR_FORMAT_BAYER10_CCCC = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC{{endif}} + CU_EGL_COLOR_FORMAT_BAYER10_CCCC = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER10_CCCC, + 'Bayer10 format - one channel in one surface with interleaved CCCC ordering.\n' + 'Out of 16 bits, 10 bits used 6 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer12 format - one channel in one surface with interleaved BCCR - #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. - CU_EGL_COLOR_FORMAT_BAYER12_BCCR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR{{endif}} + CU_EGL_COLOR_FORMAT_BAYER12_BCCR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_BCCR, + 'Bayer12 format - one channel in one surface with interleaved BCCR ordering.\n' + 'Out of 16 bits, 12 bits used 4 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer12 format - one channel in one surface with interleaved RCCB - #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. - CU_EGL_COLOR_FORMAT_BAYER12_RCCB = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB{{endif}} + CU_EGL_COLOR_FORMAT_BAYER12_RCCB = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_RCCB, + 'Bayer12 format - one channel in one surface with interleaved RCCB ordering.\n' + 'Out of 16 bits, 12 bits used 4 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer12 format - one channel in one surface with interleaved CRBC - #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. - CU_EGL_COLOR_FORMAT_BAYER12_CRBC = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC{{endif}} + CU_EGL_COLOR_FORMAT_BAYER12_CRBC = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CRBC, + 'Bayer12 format - one channel in one surface with interleaved CRBC ordering.\n' + 'Out of 16 bits, 12 bits used 4 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer12 format - one channel in one surface with interleaved CBRC - #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. - CU_EGL_COLOR_FORMAT_BAYER12_CBRC = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC{{endif}} + CU_EGL_COLOR_FORMAT_BAYER12_CBRC = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CBRC, + 'Bayer12 format - one channel in one surface with interleaved CBRC ordering.\n' + 'Out of 16 bits, 12 bits used 4 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer12 format - one channel in one surface with interleaved CCCC - #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. - CU_EGL_COLOR_FORMAT_BAYER12_CCCC = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC{{endif}} + CU_EGL_COLOR_FORMAT_BAYER12_CCCC = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_BAYER12_CCCC, + 'Bayer12 format - one channel in one surface with interleaved CCCC ordering.\n' + 'Out of 16 bits, 12 bits used 4 bits No-op.\n' + ){{endif}} {{if True}} - #: Color format for single Y plane. - CU_EGL_COLOR_FORMAT_Y = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y{{endif}} + CU_EGL_COLOR_FORMAT_Y = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y, + 'Color format for single Y plane.\n' + ){{endif}} {{if True}} - #: Y, UV in two surfaces (UV as one surface) U/V width = 1/2 Y width, - #: U/V height = 1/2 Y height. - CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020{{endif}} + CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020, + 'Y, UV in two surfaces (UV as one surface) U/V width = 1/2 Y width, U/V\n' + 'height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Y, VU in two surfaces (VU as one surface) U/V width = 1/2 Y width, - #: U/V height = 1/2 Y height. - CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020{{endif}} + CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020, + 'Y, VU in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V\n' + 'height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V - #: height= 1/2 Y height. - CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020{{endif}} + CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020, + 'Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V height=\n' + '1/2 Y height.\n' + ){{endif}} {{if True}} - #: Y, V, U each in a separate surface, U/V width = 1/2 Y width, U/V - #: height = 1/2 Y height. - CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020{{endif}} + CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020, + 'Y, V, U each in a separate surface, U/V width = 1/2 Y width, U/V height =\n' + '1/2 Y height.\n' + ){{endif}} {{if True}} - #: Y, UV in two surfaces (UV as one surface) U/V width = 1/2 Y width, - #: U/V height = 1/2 Y height. - CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709{{endif}} + CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709, + 'Y, UV in two surfaces (UV as one surface) U/V width = 1/2 Y width, U/V\n' + 'height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Y, VU in two surfaces (VU as one surface) U/V width = 1/2 Y width, - #: U/V height = 1/2 Y height. - CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709{{endif}} + CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709, + 'Y, VU in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V\n' + 'height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V - #: height = 1/2 Y height. - CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709{{endif}} + CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709, + 'Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V height =\n' + '1/2 Y height.\n' + ){{endif}} {{if True}} - #: Y, V, U each in a separate surface, U/V width = 1/2 Y width, U/V - #: height = 1/2 Y height. - CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709{{endif}} + CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709 = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709, + 'Y, V, U each in a separate surface, U/V width = 1/2 Y width, U/V height =\n' + '1/2 Y height.\n' + ){{endif}} {{if True}} - #: Y10, V10U10 in two surfaces (VU as one surface), U/V width = 1/2 Y - #: width, U/V height = 1/2 Y height. - CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709{{endif}} + CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709, + 'Y10, V10U10 in two surfaces (VU as one surface), U/V width = 1/2 Y width,\n' + 'U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Y10, V10U10 in two surfaces (VU as one surface), U/V width = 1/2 Y - #: width, U/V height = 1/2 Y height. - CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020{{endif}} + CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020, + 'Y10, V10U10 in two surfaces (VU as one surface), U/V width = 1/2 Y width,\n' + 'U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Y10, V10U10 in two surfaces(VU as one surface) U/V width = 1/2 Y - #: width, U/V height = Y height. - CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020{{endif}} + CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020, + 'Y10, V10U10 in two surfaces(VU as one surface) U/V width = 1/2 Y width, U/V\n' + 'height = Y height.\n' + ){{endif}} {{if True}} - #: Y10, V10U10 in two surfaces(VU as one surface) U/V width = 1/2 Y - #: width, U/V height = Y height. - CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR{{endif}} + CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR, + 'Y10, V10U10 in two surfaces(VU as one surface) U/V width = 1/2 Y width, U/V\n' + 'height = Y height.\n' + ){{endif}} {{if True}} - #: Y10, V10U10 in two surfaces(VU as one surface) U/V width = 1/2 Y - #: width, U/V height = Y height. - CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709{{endif}} + CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709 = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709, + 'Y10, V10U10 in two surfaces(VU as one surface) U/V width = 1/2 Y width, U/V\n' + 'height = Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Color format for single Y plane. - CU_EGL_COLOR_FORMAT_Y_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER{{endif}} + CU_EGL_COLOR_FORMAT_Y_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_ER, + 'Extended Range Color format for single Y plane.\n' + ){{endif}} {{if True}} - #: Extended Range Color format for single Y plane. - CU_EGL_COLOR_FORMAT_Y_709_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER{{endif}} + CU_EGL_COLOR_FORMAT_Y_709_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y_709_ER, + 'Extended Range Color format for single Y plane.\n' + ){{endif}} {{if True}} - #: Extended Range Color format for single Y10 plane. - CU_EGL_COLOR_FORMAT_Y10_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER{{endif}} + CU_EGL_COLOR_FORMAT_Y10_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_ER, + 'Extended Range Color format for single Y10 plane.\n' + ){{endif}} {{if True}} - #: Extended Range Color format for single Y10 plane. - CU_EGL_COLOR_FORMAT_Y10_709_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER{{endif}} + CU_EGL_COLOR_FORMAT_Y10_709_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10_709_ER, + 'Extended Range Color format for single Y10 plane.\n' + ){{endif}} {{if True}} - #: Extended Range Color format for single Y12 plane. - CU_EGL_COLOR_FORMAT_Y12_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER{{endif}} + CU_EGL_COLOR_FORMAT_Y12_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_ER, + 'Extended Range Color format for single Y12 plane.\n' + ){{endif}} {{if True}} - #: Extended Range Color format for single Y12 plane. - CU_EGL_COLOR_FORMAT_Y12_709_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER{{endif}} + CU_EGL_COLOR_FORMAT_Y12_709_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12_709_ER, + 'Extended Range Color format for single Y12 plane.\n' + ){{endif}} {{if True}} - #: Y, U, V, A four channels in one surface, interleaved as AVUY. - CU_EGL_COLOR_FORMAT_YUVA = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA{{endif}} + CU_EGL_COLOR_FORMAT_YUVA = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUVA, + 'Y, U, V, A four channels in one surface, interleaved as AVUY.\n' + ){{endif}} {{if True}} - #: Y, U, V three channels in one surface, interleaved as VUY. Only - #: pitch linear format supported. - CU_EGL_COLOR_FORMAT_YUV = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV{{endif}} + CU_EGL_COLOR_FORMAT_YUV = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUV, + 'Y, U, V three channels in one surface, interleaved as VUY. Only pitch\n' + 'linear format supported.\n' + ){{endif}} {{if True}} - #: Y, U, V in one surface, interleaved as YVYU in one channel. - CU_EGL_COLOR_FORMAT_YVYU = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU{{endif}} + CU_EGL_COLOR_FORMAT_YVYU = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YVYU, + 'Y, U, V in one surface, interleaved as YVYU in one channel.\n' + ){{endif}} {{if True}} - #: Y, U, V in one surface, interleaved as VYUY in one channel. - CU_EGL_COLOR_FORMAT_VYUY = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY{{endif}} + CU_EGL_COLOR_FORMAT_VYUY = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_VYUY, + 'Y, U, V in one surface, interleaved as VYUY in one channel.\n' + ){{endif}} {{if True}} - #: Extended Range Y10, V10U10 in two surfaces(VU as one surface) U/V - #: width = 1/2 Y width, U/V height = 1/2 Y height. - CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER{{endif}} + CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER, + 'Extended Range Y10, V10U10 in two surfaces(VU as one surface) U/V width =\n' + '1/2 Y width, U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y10, V10U10 in two surfaces(VU as one surface) U/V - #: width = 1/2 Y width, U/V height = 1/2 Y height. - CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER{{endif}} + CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER, + 'Extended Range Y10, V10U10 in two surfaces(VU as one surface) U/V width =\n' + '1/2 Y width, U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V - #: width = Y width, U/V height = Y height. - CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER{{endif}} + CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER, + 'Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V width =\n' + 'Y width, U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V - #: width = Y width, U/V height = Y height. - CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER{{endif}} + CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER, + 'Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V width =\n' + 'Y width, U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V - #: width = 1/2 Y width, U/V height = 1/2 Y height. - CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER{{endif}} + CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER, + 'Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width =\n' + '1/2 Y width, U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V - #: width = 1/2 Y width, U/V height = 1/2 Y height. - CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER{{endif}} + CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER, + 'Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width =\n' + '1/2 Y width, U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V - #: width = Y width, U/V height = Y height. - CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER{{endif}} + CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER, + 'Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width =\n' + 'Y width, U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V - #: width = Y width, U/V height = Y height. - CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER{{endif}} + CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER, + 'Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width =\n' + 'Y width, U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Y, U, V in one surface, interleaved as UYVY in one channel. - CU_EGL_COLOR_FORMAT_UYVY_709 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709{{endif}} + CU_EGL_COLOR_FORMAT_UYVY_709 = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709, + 'Y, U, V in one surface, interleaved as UYVY in one channel.\n' + ){{endif}} {{if True}} - #: Extended Range Y, U, V in one surface, interleaved as UYVY in one - #: channel. - CU_EGL_COLOR_FORMAT_UYVY_709_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709_ER{{endif}} + CU_EGL_COLOR_FORMAT_UYVY_709_ER = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709_ER, + 'Extended Range Y, U, V in one surface, interleaved as UYVY in one channel.\n' + ){{endif}} {{if True}} - #: Y, U, V in one surface, interleaved as UYVY in one channel. - CU_EGL_COLOR_FORMAT_UYVY_2020 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_2020{{endif}} + CU_EGL_COLOR_FORMAT_UYVY_2020 = ( + cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_2020, + 'Y, U, V in one surface, interleaved as UYVY in one channel.\n' + ){{endif}} {{if True}} CU_EGL_COLOR_FORMAT_MAX = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_MAX{{endif}} -_dict_CUeglColorFormat = dict(((int(v), v) for k, v in CUeglColorFormat.__members__.items())) {{endif}} {{if True}} -class CUGLDeviceList(IntEnum): +class CUGLDeviceList(_FastEnum): """ CUDA devices corresponding to an OpenGL device """ {{if True}} - #: The CUDA devices for all GPUs used by the current OpenGL context - CU_GL_DEVICE_LIST_ALL = cydriver.CUGLDeviceList_enum.CU_GL_DEVICE_LIST_ALL{{endif}} + CU_GL_DEVICE_LIST_ALL = ( + cydriver.CUGLDeviceList_enum.CU_GL_DEVICE_LIST_ALL, + 'The CUDA devices for all GPUs used by the current OpenGL context\n' + ){{endif}} {{if True}} - #: The CUDA devices for the GPUs used by the current OpenGL context in - #: its currently rendering frame - CU_GL_DEVICE_LIST_CURRENT_FRAME = cydriver.CUGLDeviceList_enum.CU_GL_DEVICE_LIST_CURRENT_FRAME{{endif}} + CU_GL_DEVICE_LIST_CURRENT_FRAME = ( + cydriver.CUGLDeviceList_enum.CU_GL_DEVICE_LIST_CURRENT_FRAME, + 'The CUDA devices for the GPUs used by the current OpenGL context in its\n' + 'currently rendering frame\n' + ){{endif}} {{if True}} - #: The CUDA devices for the GPUs to be used by the current OpenGL - #: context in the next frame - CU_GL_DEVICE_LIST_NEXT_FRAME = cydriver.CUGLDeviceList_enum.CU_GL_DEVICE_LIST_NEXT_FRAME{{endif}} + CU_GL_DEVICE_LIST_NEXT_FRAME = ( + cydriver.CUGLDeviceList_enum.CU_GL_DEVICE_LIST_NEXT_FRAME, + 'The CUDA devices for the GPUs to be used by the current OpenGL context in\n' + 'the next frame\n' + ){{endif}} -_dict_CUGLDeviceList = dict(((int(v), v) for k, v in CUGLDeviceList.__members__.items())) {{endif}} {{if True}} -class CUGLmap_flags(IntEnum): +class CUGLmap_flags(_FastEnum): """ Flags to map or unmap a resource """ @@ -6249,7 +7801,6 @@ class CUGLmap_flags(IntEnum): {{if True}} CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = cydriver.CUGLmap_flags_enum.CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD{{endif}} -_dict_CUGLmap_flags = dict(((int(v), v) for k, v in CUGLmap_flags.__members__.items())) {{endif}} {{if 'CUdeviceptr' in found_types}} @@ -6401,433 +7952,467 @@ cdef class CUgraphConditionalHandle: {{if 'CUlaunchAttributeID_enum' in found_types}} -class CUkernelNodeAttrID(IntEnum): +class CUlaunchAttributeID(_FastEnum): """ Launch attributes enum; used as id field of :py:obj:`~.CUlaunchAttribute` """ {{if 'CU_LAUNCH_ATTRIBUTE_IGNORE' in found_values}} - #: Ignored entry, for convenient composition - CU_LAUNCH_ATTRIBUTE_IGNORE = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_IGNORE{{endif}} + CU_LAUNCH_ATTRIBUTE_IGNORE = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_IGNORE, + 'Ignored entry, for convenient composition\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW' in found_values}} - #: Valid for streams, graph nodes, launches. See - #: :py:obj:`~.CUlaunchAttributeValue.accessPolicyWindow`. - CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW{{endif}} + CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW, + 'Valid for streams, graph nodes, launches. See\n' + ':py:obj:`~.CUlaunchAttributeValue.accessPolicyWindow`.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_COOPERATIVE' in found_values}} - #: Valid for graph nodes, launches. See - #: :py:obj:`~.CUlaunchAttributeValue.cooperative`. - CU_LAUNCH_ATTRIBUTE_COOPERATIVE = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_COOPERATIVE{{endif}} + CU_LAUNCH_ATTRIBUTE_COOPERATIVE = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_COOPERATIVE, + 'Valid for graph nodes, launches. See\n' + ':py:obj:`~.CUlaunchAttributeValue.cooperative`.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY' in found_values}} - #: Valid for streams. See - #: :py:obj:`~.CUlaunchAttributeValue.syncPolicy`. - CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY{{endif}} + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY, + 'Valid for streams. See :py:obj:`~.CUlaunchAttributeValue.syncPolicy`.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION' in found_values}} - #: Valid for graph nodes, launches. See - #: :py:obj:`~.CUlaunchAttributeValue.clusterDim`. - CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION{{endif}} + CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION, + 'Valid for graph nodes, launches. See\n' + ':py:obj:`~.CUlaunchAttributeValue.clusterDim`.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE' in found_values}} - #: Valid for graph nodes, launches. See - #: :py:obj:`~.CUlaunchAttributeValue.clusterSchedulingPolicyPreference`. - CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE{{endif}} + CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE, + 'Valid for graph nodes, launches. See\n' + ':py:obj:`~.CUlaunchAttributeValue.clusterSchedulingPolicyPreference`.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION' in found_values}} - #: Valid for launches. Setting - #: :py:obj:`~.CUlaunchAttributeValue.programmaticStreamSerializationAllowed` - #: to non-0 signals that the kernel will use programmatic means to - #: resolve its stream dependency, so that the CUDA runtime should - #: opportunistically allow the grid's execution to overlap with the - #: previous kernel in the stream, if that kernel requests the overlap. - #: The dependent launches can choose to wait on the dependency using - #: the programmatic sync (cudaGridDependencySynchronize() or equivalent - #: PTX instructions). - CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION{{endif}} + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION, + 'Valid for launches. Setting\n' + ':py:obj:`~.CUlaunchAttributeValue.programmaticStreamSerializationAllowed`\n' + 'to non-0 signals that the kernel will use programmatic means to resolve its\n' + 'stream dependency, so that the CUDA runtime should opportunistically allow\n' + "the grid's execution to overlap with the previous kernel in the stream, if\n" + 'that kernel requests the overlap. The dependent launches can choose to wait\n' + 'on the dependency using the programmatic sync\n' + '(cudaGridDependencySynchronize() or equivalent PTX instructions).\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT' in found_values}} - #: Valid for launches. Set - #: :py:obj:`~.CUlaunchAttributeValue.programmaticEvent` to record the - #: event. Event recorded through this launch attribute is guaranteed to - #: only trigger after all block in the associated kernel trigger the - #: event. A block can trigger the event through PTX launchdep.release - #: or CUDA builtin function cudaTriggerProgrammaticLaunchCompletion(). - #: A trigger can also be inserted at the beginning of each block's - #: execution if triggerAtBlockStart is set to non-0. The dependent - #: launches can choose to wait on the dependency using the programmatic - #: sync (cudaGridDependencySynchronize() or equivalent PTX - #: instructions). Note that dependents (including the CPU thread - #: calling :py:obj:`~.cuEventSynchronize()`) are not guaranteed to - #: observe the release precisely when it is released. For example, - #: :py:obj:`~.cuEventSynchronize()` may only observe the event trigger - #: long after the associated kernel has completed. This recording type - #: is primarily meant for establishing programmatic dependency between - #: device tasks. Note also this type of dependency allows, but does not - #: guarantee, concurrent execution of tasks. - #: The event supplied must not be an interprocess or interop event. - #: The event must disable timing (i.e. must be created with the - #: :py:obj:`~.CU_EVENT_DISABLE_TIMING` flag set). - CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT{{endif}} + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT, + 'Valid for launches. Set\n' + ':py:obj:`~.CUlaunchAttributeValue.programmaticEvent` to record the event.\n' + 'Event recorded through this launch attribute is guaranteed to only trigger\n' + 'after all block in the associated kernel trigger the event. A block can\n' + 'trigger the event through PTX launchdep.release or CUDA builtin function\n' + 'cudaTriggerProgrammaticLaunchCompletion(). A trigger can also be inserted\n' + "at the beginning of each block's execution if triggerAtBlockStart is set to\n" + 'non-0. The dependent launches can choose to wait on the dependency using\n' + 'the programmatic sync (cudaGridDependencySynchronize() or equivalent PTX\n' + 'instructions). Note that dependents (including the CPU thread calling\n' + ':py:obj:`~.cuEventSynchronize()`) are not guaranteed to observe the release\n' + 'precisely when it is released. For example,\n' + ':py:obj:`~.cuEventSynchronize()` may only observe the event trigger long\n' + 'after the associated kernel has completed. This recording type is primarily\n' + 'meant for establishing programmatic dependency between device tasks. Note\n' + 'also this type of dependency allows, but does not guarantee, concurrent\n' + 'execution of tasks.\n' + ' The event supplied must not be an interprocess or interop event. The event\n' + 'must disable timing (i.e. must be created with the\n' + ':py:obj:`~.CU_EVENT_DISABLE_TIMING` flag set).\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_PRIORITY' in found_values}} - #: Valid for streams, graph nodes, launches. See - #: :py:obj:`~.CUlaunchAttributeValue.priority`. - CU_LAUNCH_ATTRIBUTE_PRIORITY = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PRIORITY{{endif}} + CU_LAUNCH_ATTRIBUTE_PRIORITY = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PRIORITY, + 'Valid for streams, graph nodes, launches. See\n' + ':py:obj:`~.CUlaunchAttributeValue.priority`.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP' in found_values}} - #: Valid for streams, graph nodes, launches. See - #: :py:obj:`~.CUlaunchAttributeValue.memSyncDomainMap`. - CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP{{endif}} + CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP, + 'Valid for streams, graph nodes, launches. See\n' + ':py:obj:`~.CUlaunchAttributeValue.memSyncDomainMap`.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN' in found_values}} - #: Valid for streams, graph nodes, launches. See - #: :py:obj:`~.CUlaunchAttributeValue.memSyncDomain`. - CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN{{endif}} + CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN, + 'Valid for streams, graph nodes, launches. See\n' + ':py:obj:`~.CUlaunchAttributeValue.memSyncDomain`.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION' in found_values}} - #: Valid for graph nodes, launches. Set - #: :py:obj:`~.CUlaunchAttributeValue.preferredClusterDim` to allow the - #: kernel launch to specify a preferred substitute cluster dimension. - #: Blocks may be grouped according to either the dimensions specified - #: with this attribute (grouped into a "preferred substitute cluster"), - #: or the one specified with - #: :py:obj:`~.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION` attribute (grouped - #: into a "regular cluster"). The cluster dimensions of a "preferred - #: substitute cluster" shall be an integer multiple greater than zero - #: of the regular cluster dimensions. The device will attempt - on a - #: best-effort basis - to group thread blocks into preferred clusters - #: over grouping them into regular clusters. When it deems necessary - #: (primarily when the device temporarily runs out of physical - #: resources to launch the larger preferred clusters), the device may - #: switch to launch the regular clusters instead to attempt to utilize - #: as much of the physical device resources as possible. - #: Each type of cluster will have its enumeration / coordinate setup - #: as if the grid consists solely of its type of cluster. For example, - #: if the preferred substitute cluster dimensions double the regular - #: cluster dimensions, there might be simultaneously a regular cluster - #: indexed at (1,0,0), and a preferred cluster indexed at (1,0,0). In - #: this example, the preferred substitute cluster (1,0,0) replaces - #: regular clusters (2,0,0) and (3,0,0) and groups their blocks. - #: This attribute will only take effect when a regular cluster - #: dimension has been specified. The preferred substitute cluster - #: dimension must be an integer multiple greater than zero of the - #: regular cluster dimension and must divide the grid. It must also be - #: no more than `maxBlocksPerCluster`, if it is set in the kernel's - #: `__launch_bounds__`. Otherwise it must be less than the maximum - #: value the driver can support. Otherwise, setting this attribute to a - #: value physically unable to fit on any particular device is - #: permitted. - CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION{{endif}} + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION, + 'Valid for graph nodes, launches. Set\n' + ':py:obj:`~.CUlaunchAttributeValue.preferredClusterDim` to allow the kernel\n' + 'launch to specify a preferred substitute cluster dimension. Blocks may be\n' + 'grouped according to either the dimensions specified with this attribute\n' + '(grouped into a "preferred substitute cluster"), or the one specified with\n' + ':py:obj:`~.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION` attribute (grouped into a\n' + '"regular cluster"). The cluster dimensions of a "preferred substitute\n' + 'cluster" shall be an integer multiple greater than zero of the regular\n' + 'cluster dimensions. The device will attempt - on a best-effort basis - to\n' + 'group thread blocks into preferred clusters over grouping them into regular\n' + 'clusters. When it deems necessary (primarily when the device temporarily\n' + 'runs out of physical resources to launch the larger preferred clusters),\n' + 'the device may switch to launch the regular clusters instead to attempt to\n' + 'utilize as much of the physical device resources as possible.\n' + ' Each type of cluster will have its enumeration / coordinate setup as if\n' + 'the grid consists solely of its type of cluster. For example, if the\n' + 'preferred substitute cluster dimensions double the regular cluster\n' + 'dimensions, there might be simultaneously a regular cluster indexed at\n' + '(1,0,0), and a preferred cluster indexed at (1,0,0). In this example, the\n' + 'preferred substitute cluster (1,0,0) replaces regular clusters (2,0,0) and\n' + '(3,0,0) and groups their blocks.\n' + ' This attribute will only take effect when a regular cluster dimension has\n' + 'been specified. The preferred substitute cluster dimension must be an\n' + 'integer multiple greater than zero of the regular cluster dimension and\n' + 'must divide the grid. It must also be no more than `maxBlocksPerCluster`,\n' + "if it is set in the kernel's `__launch_bounds__`. Otherwise it must be less\n" + 'than the maximum value the driver can support. Otherwise, setting this\n' + 'attribute to a value physically unable to fit on any particular device is\n' + 'permitted.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT' in found_values}} - #: Valid for launches. Set - #: :py:obj:`~.CUlaunchAttributeValue.launchCompletionEvent` to record - #: the event. - #: Nominally, the event is triggered once all blocks of the kernel - #: have begun execution. Currently this is a best effort. If a kernel B - #: has a launch completion dependency on a kernel A, B may wait until A - #: is complete. Alternatively, blocks of B may begin before all blocks - #: of A have begun, for example if B can claim execution resources - #: unavailable to A (e.g. they run on different GPUs) or if B is a - #: higher priority than A. Exercise caution if such an ordering - #: inversion could lead to deadlock. - #: A launch completion event is nominally similar to a programmatic - #: event with `triggerAtBlockStart` set except that it is not visible - #: to `cudaGridDependencySynchronize()` and can be used with compute - #: capability less than 9.0. - #: The event supplied must not be an interprocess or interop event. - #: The event must disable timing (i.e. must be created with the - #: :py:obj:`~.CU_EVENT_DISABLE_TIMING` flag set). - CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT{{endif}} + CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT, + 'Valid for launches. Set\n' + ':py:obj:`~.CUlaunchAttributeValue.launchCompletionEvent` to record the\n' + 'event.\n' + ' Nominally, the event is triggered once all blocks of the kernel have begun\n' + 'execution. Currently this is a best effort. If a kernel B has a launch\n' + 'completion dependency on a kernel A, B may wait until A is complete.\n' + 'Alternatively, blocks of B may begin before all blocks of A have begun, for\n' + 'example if B can claim execution resources unavailable to A (e.g. they run\n' + 'on different GPUs) or if B is a higher priority than A. Exercise caution if\n' + 'such an ordering inversion could lead to deadlock.\n' + ' A launch completion event is nominally similar to a programmatic event\n' + 'with `triggerAtBlockStart` set except that it is not visible to\n' + '`cudaGridDependencySynchronize()` and can be used with compute capability\n' + 'less than 9.0.\n' + ' The event supplied must not be an interprocess or interop event. The event\n' + 'must disable timing (i.e. must be created with the\n' + ':py:obj:`~.CU_EVENT_DISABLE_TIMING` flag set).\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE' in found_values}} - #: Valid for graph nodes, launches. This attribute is graphs-only, and - #: passing it to a launch in a non-capturing stream will result in an - #: error. - #: :py:obj:`~.CUlaunchAttributeValue`::deviceUpdatableKernelNode::deviceUpdatable - #: can only be set to 0 or 1. Setting the field to 1 indicates that the - #: corresponding kernel node should be device-updatable. On success, a - #: handle will be returned via - #: :py:obj:`~.CUlaunchAttributeValue`::deviceUpdatableKernelNode::devNode - #: which can be passed to the various device-side update functions to - #: update the node's kernel parameters from within another kernel. For - #: more information on the types of device updates that can be made, as - #: well as the relevant limitations thereof, see - #: :py:obj:`~.cudaGraphKernelNodeUpdatesApply`. - #: Nodes which are device-updatable have additional restrictions - #: compared to regular kernel nodes. Firstly, device-updatable nodes - #: cannot be removed from their graph via - #: :py:obj:`~.cuGraphDestroyNode`. Additionally, once opted-in to this - #: functionality, a node cannot opt out, and any attempt to set the - #: deviceUpdatable attribute to 0 will result in an error. Device- - #: updatable kernel nodes also cannot have their attributes copied - #: to/from another kernel node via - #: :py:obj:`~.cuGraphKernelNodeCopyAttributes`. Graphs containing one - #: or more device-updatable nodes also do not allow multiple - #: instantiation, and neither the graph nor its instantiated version - #: can be passed to :py:obj:`~.cuGraphExecUpdate`. - #: If a graph contains device-updatable nodes and updates those nodes - #: from the device from within the graph, the graph must be uploaded - #: with :py:obj:`~.cuGraphUpload` before it is launched. For such a - #: graph, if host-side executable graph updates are made to the device- - #: updatable nodes, the graph must be uploaded before it is launched - #: again. - CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE{{endif}} + CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE, + 'Valid for graph nodes, launches. This attribute is graphs-only, and passing\n' + 'it to a launch in a non-capturing stream will result in an error.\n' + ':py:obj:`~.CUlaunchAttributeValue`::deviceUpdatableKernelNode::deviceUpdatable\n' + 'can only be set to 0 or 1. Setting the field to 1 indicates that the\n' + 'corresponding kernel node should be device-updatable. On success, a handle\n' + 'will be returned via\n' + ':py:obj:`~.CUlaunchAttributeValue`::deviceUpdatableKernelNode::devNode\n' + 'which can be passed to the various device-side update functions to update\n' + "the node's kernel parameters from within another kernel. For more\n" + 'information on the types of device updates that can be made, as well as the\n' + 'relevant limitations thereof, see\n' + ':py:obj:`~.cudaGraphKernelNodeUpdatesApply`.\n' + ' Nodes which are device-updatable have additional restrictions compared to\n' + 'regular kernel nodes. Firstly, device-updatable nodes cannot be removed\n' + 'from their graph via :py:obj:`~.cuGraphDestroyNode`. Additionally, once\n' + 'opted-in to this functionality, a node cannot opt out, and any attempt to\n' + 'set the deviceUpdatable attribute to 0 will result in an error. Device-\n' + 'updatable kernel nodes also cannot have their attributes copied to/from\n' + 'another kernel node via :py:obj:`~.cuGraphKernelNodeCopyAttributes`. Graphs\n' + 'containing one or more device-updatable nodes also do not allow multiple\n' + 'instantiation, and neither the graph nor its instantiated version can be\n' + 'passed to :py:obj:`~.cuGraphExecUpdate`.\n' + ' If a graph contains device-updatable nodes and updates those nodes from\n' + 'the device from within the graph, the graph must be uploaded with\n' + ':py:obj:`~.cuGraphUpload` before it is launched. For such a graph, if host-\n' + 'side executable graph updates are made to the device-updatable nodes, the\n' + 'graph must be uploaded before it is launched again.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT' in found_values}} - #: Valid for launches. On devices where the L1 cache and shared memory - #: use the same hardware resources, setting - #: :py:obj:`~.CUlaunchAttributeValue.sharedMemCarveout` to a percentage - #: between 0-100 signals the CUDA driver to set the shared memory - #: carveout preference, in percent of the total shared memory for that - #: kernel launch. This attribute takes precedence over - #: :py:obj:`~.CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT`. This - #: is only a hint, and the CUDA driver can choose a different - #: configuration if required for the launch. - CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT{{endif}} + CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT, + 'Valid for launches. On devices where the L1 cache and shared memory use the\n' + 'same hardware resources, setting\n' + ':py:obj:`~.CUlaunchAttributeValue.sharedMemCarveout` to a percentage\n' + 'between 0-100 signals the CUDA driver to set the shared memory carveout\n' + 'preference, in percent of the total shared memory for that kernel launch.\n' + 'This attribute takes precedence over\n' + ':py:obj:`~.CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT`. This is\n' + 'only a hint, and the CUDA driver can choose a different configuration if\n' + 'required for the launch.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_NVLINK_UTIL_CENTRIC_SCHEDULING' in found_values}} - #: Valid for streams, graph nodes, launches. This attribute is a hint - #: to the CUDA runtime that the launch should attempt to make the - #: kernel maximize its NVLINK utilization. - #: - #: When possible to honor this hint, CUDA will assume each block in - #: the grid launch will carry out an even amount of NVLINK traffic, and - #: make a best-effort attempt to adjust the kernel launch based on that - #: assumption. - #: This attribute is a hint only. CUDA makes no functional or - #: performance guarantee. Its applicability can be affected by many - #: different factors, including driver version (i.e. CUDA doesn't - #: guarantee the performance characteristics will be maintained between - #: driver versions or a driver update could alter or regress previously - #: observed perf characteristics.) It also doesn't guarantee a - #: successful result, i.e. applying the attribute may not improve the - #: performance of either the targeted kernel or the encapsulating - #: application. - #: Valid values for - #: :py:obj:`~.CUlaunchAttributeValue`::nvlinkUtilCentricScheduling are - #: 0 (disabled) and 1 (enabled). - CU_LAUNCH_ATTRIBUTE_NVLINK_UTIL_CENTRIC_SCHEDULING = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_NVLINK_UTIL_CENTRIC_SCHEDULING{{endif}} - -_dict_CUlaunchAttributeID = dict(((int(v), v) for k, v in CUlaunchAttributeID.__members__.items())) + CU_LAUNCH_ATTRIBUTE_NVLINK_UTIL_CENTRIC_SCHEDULING = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_NVLINK_UTIL_CENTRIC_SCHEDULING, + 'Valid for streams, graph nodes, launches. This attribute is a hint to the\n' + 'CUDA runtime that the launch should attempt to make the kernel maximize its\n' + 'NVLINK utilization.\n' + ' When possible to honor this hint, CUDA will assume each block in the grid\n' + 'launch will carry out an even amount of NVLINK traffic, and make a best-\n' + 'effort attempt to adjust the kernel launch based on that assumption.\n' + ' This attribute is a hint only. CUDA makes no functional or performance\n' + 'guarantee. Its applicability can be affected by many different factors,\n' + "including driver version (i.e. CUDA doesn't guarantee the performance\n" + 'characteristics will be maintained between driver versions or a driver\n' + 'update could alter or regress previously observed perf characteristics.) It\n' + "also doesn't guarantee a successful result, i.e. applying the attribute may\n" + 'not improve the performance of either the targeted kernel or the\n' + 'encapsulating application.\n' + ' Valid values for\n' + ':py:obj:`~.CUlaunchAttributeValue`::nvlinkUtilCentricScheduling are 0\n' + '(disabled) and 1 (enabled).\n' + ){{endif}} + {{endif}} {{if 'CUlaunchAttributeID_enum' in found_types}} -class CUstreamAttrID(IntEnum): +class CUlaunchAttributeID(_FastEnum): """ Launch attributes enum; used as id field of :py:obj:`~.CUlaunchAttribute` """ {{if 'CU_LAUNCH_ATTRIBUTE_IGNORE' in found_values}} - #: Ignored entry, for convenient composition - CU_LAUNCH_ATTRIBUTE_IGNORE = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_IGNORE{{endif}} + CU_LAUNCH_ATTRIBUTE_IGNORE = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_IGNORE, + 'Ignored entry, for convenient composition\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW' in found_values}} - #: Valid for streams, graph nodes, launches. See - #: :py:obj:`~.CUlaunchAttributeValue.accessPolicyWindow`. - CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW{{endif}} + CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW, + 'Valid for streams, graph nodes, launches. See\n' + ':py:obj:`~.CUlaunchAttributeValue.accessPolicyWindow`.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_COOPERATIVE' in found_values}} - #: Valid for graph nodes, launches. See - #: :py:obj:`~.CUlaunchAttributeValue.cooperative`. - CU_LAUNCH_ATTRIBUTE_COOPERATIVE = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_COOPERATIVE{{endif}} + CU_LAUNCH_ATTRIBUTE_COOPERATIVE = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_COOPERATIVE, + 'Valid for graph nodes, launches. See\n' + ':py:obj:`~.CUlaunchAttributeValue.cooperative`.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY' in found_values}} - #: Valid for streams. See - #: :py:obj:`~.CUlaunchAttributeValue.syncPolicy`. - CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY{{endif}} + CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY, + 'Valid for streams. See :py:obj:`~.CUlaunchAttributeValue.syncPolicy`.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION' in found_values}} - #: Valid for graph nodes, launches. See - #: :py:obj:`~.CUlaunchAttributeValue.clusterDim`. - CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION{{endif}} + CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION, + 'Valid for graph nodes, launches. See\n' + ':py:obj:`~.CUlaunchAttributeValue.clusterDim`.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE' in found_values}} - #: Valid for graph nodes, launches. See - #: :py:obj:`~.CUlaunchAttributeValue.clusterSchedulingPolicyPreference`. - CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE{{endif}} + CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE, + 'Valid for graph nodes, launches. See\n' + ':py:obj:`~.CUlaunchAttributeValue.clusterSchedulingPolicyPreference`.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION' in found_values}} - #: Valid for launches. Setting - #: :py:obj:`~.CUlaunchAttributeValue.programmaticStreamSerializationAllowed` - #: to non-0 signals that the kernel will use programmatic means to - #: resolve its stream dependency, so that the CUDA runtime should - #: opportunistically allow the grid's execution to overlap with the - #: previous kernel in the stream, if that kernel requests the overlap. - #: The dependent launches can choose to wait on the dependency using - #: the programmatic sync (cudaGridDependencySynchronize() or equivalent - #: PTX instructions). - CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION{{endif}} + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION, + 'Valid for launches. Setting\n' + ':py:obj:`~.CUlaunchAttributeValue.programmaticStreamSerializationAllowed`\n' + 'to non-0 signals that the kernel will use programmatic means to resolve its\n' + 'stream dependency, so that the CUDA runtime should opportunistically allow\n' + "the grid's execution to overlap with the previous kernel in the stream, if\n" + 'that kernel requests the overlap. The dependent launches can choose to wait\n' + 'on the dependency using the programmatic sync\n' + '(cudaGridDependencySynchronize() or equivalent PTX instructions).\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT' in found_values}} - #: Valid for launches. Set - #: :py:obj:`~.CUlaunchAttributeValue.programmaticEvent` to record the - #: event. Event recorded through this launch attribute is guaranteed to - #: only trigger after all block in the associated kernel trigger the - #: event. A block can trigger the event through PTX launchdep.release - #: or CUDA builtin function cudaTriggerProgrammaticLaunchCompletion(). - #: A trigger can also be inserted at the beginning of each block's - #: execution if triggerAtBlockStart is set to non-0. The dependent - #: launches can choose to wait on the dependency using the programmatic - #: sync (cudaGridDependencySynchronize() or equivalent PTX - #: instructions). Note that dependents (including the CPU thread - #: calling :py:obj:`~.cuEventSynchronize()`) are not guaranteed to - #: observe the release precisely when it is released. For example, - #: :py:obj:`~.cuEventSynchronize()` may only observe the event trigger - #: long after the associated kernel has completed. This recording type - #: is primarily meant for establishing programmatic dependency between - #: device tasks. Note also this type of dependency allows, but does not - #: guarantee, concurrent execution of tasks. - #: The event supplied must not be an interprocess or interop event. - #: The event must disable timing (i.e. must be created with the - #: :py:obj:`~.CU_EVENT_DISABLE_TIMING` flag set). - CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT{{endif}} + CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT, + 'Valid for launches. Set\n' + ':py:obj:`~.CUlaunchAttributeValue.programmaticEvent` to record the event.\n' + 'Event recorded through this launch attribute is guaranteed to only trigger\n' + 'after all block in the associated kernel trigger the event. A block can\n' + 'trigger the event through PTX launchdep.release or CUDA builtin function\n' + 'cudaTriggerProgrammaticLaunchCompletion(). A trigger can also be inserted\n' + "at the beginning of each block's execution if triggerAtBlockStart is set to\n" + 'non-0. The dependent launches can choose to wait on the dependency using\n' + 'the programmatic sync (cudaGridDependencySynchronize() or equivalent PTX\n' + 'instructions). Note that dependents (including the CPU thread calling\n' + ':py:obj:`~.cuEventSynchronize()`) are not guaranteed to observe the release\n' + 'precisely when it is released. For example,\n' + ':py:obj:`~.cuEventSynchronize()` may only observe the event trigger long\n' + 'after the associated kernel has completed. This recording type is primarily\n' + 'meant for establishing programmatic dependency between device tasks. Note\n' + 'also this type of dependency allows, but does not guarantee, concurrent\n' + 'execution of tasks.\n' + ' The event supplied must not be an interprocess or interop event. The event\n' + 'must disable timing (i.e. must be created with the\n' + ':py:obj:`~.CU_EVENT_DISABLE_TIMING` flag set).\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_PRIORITY' in found_values}} - #: Valid for streams, graph nodes, launches. See - #: :py:obj:`~.CUlaunchAttributeValue.priority`. - CU_LAUNCH_ATTRIBUTE_PRIORITY = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PRIORITY{{endif}} + CU_LAUNCH_ATTRIBUTE_PRIORITY = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PRIORITY, + 'Valid for streams, graph nodes, launches. See\n' + ':py:obj:`~.CUlaunchAttributeValue.priority`.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP' in found_values}} - #: Valid for streams, graph nodes, launches. See - #: :py:obj:`~.CUlaunchAttributeValue.memSyncDomainMap`. - CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP{{endif}} + CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP, + 'Valid for streams, graph nodes, launches. See\n' + ':py:obj:`~.CUlaunchAttributeValue.memSyncDomainMap`.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN' in found_values}} - #: Valid for streams, graph nodes, launches. See - #: :py:obj:`~.CUlaunchAttributeValue.memSyncDomain`. - CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN{{endif}} + CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN, + 'Valid for streams, graph nodes, launches. See\n' + ':py:obj:`~.CUlaunchAttributeValue.memSyncDomain`.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION' in found_values}} - #: Valid for graph nodes, launches. Set - #: :py:obj:`~.CUlaunchAttributeValue.preferredClusterDim` to allow the - #: kernel launch to specify a preferred substitute cluster dimension. - #: Blocks may be grouped according to either the dimensions specified - #: with this attribute (grouped into a "preferred substitute cluster"), - #: or the one specified with - #: :py:obj:`~.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION` attribute (grouped - #: into a "regular cluster"). The cluster dimensions of a "preferred - #: substitute cluster" shall be an integer multiple greater than zero - #: of the regular cluster dimensions. The device will attempt - on a - #: best-effort basis - to group thread blocks into preferred clusters - #: over grouping them into regular clusters. When it deems necessary - #: (primarily when the device temporarily runs out of physical - #: resources to launch the larger preferred clusters), the device may - #: switch to launch the regular clusters instead to attempt to utilize - #: as much of the physical device resources as possible. - #: Each type of cluster will have its enumeration / coordinate setup - #: as if the grid consists solely of its type of cluster. For example, - #: if the preferred substitute cluster dimensions double the regular - #: cluster dimensions, there might be simultaneously a regular cluster - #: indexed at (1,0,0), and a preferred cluster indexed at (1,0,0). In - #: this example, the preferred substitute cluster (1,0,0) replaces - #: regular clusters (2,0,0) and (3,0,0) and groups their blocks. - #: This attribute will only take effect when a regular cluster - #: dimension has been specified. The preferred substitute cluster - #: dimension must be an integer multiple greater than zero of the - #: regular cluster dimension and must divide the grid. It must also be - #: no more than `maxBlocksPerCluster`, if it is set in the kernel's - #: `__launch_bounds__`. Otherwise it must be less than the maximum - #: value the driver can support. Otherwise, setting this attribute to a - #: value physically unable to fit on any particular device is - #: permitted. - CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION{{endif}} + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION, + 'Valid for graph nodes, launches. Set\n' + ':py:obj:`~.CUlaunchAttributeValue.preferredClusterDim` to allow the kernel\n' + 'launch to specify a preferred substitute cluster dimension. Blocks may be\n' + 'grouped according to either the dimensions specified with this attribute\n' + '(grouped into a "preferred substitute cluster"), or the one specified with\n' + ':py:obj:`~.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION` attribute (grouped into a\n' + '"regular cluster"). The cluster dimensions of a "preferred substitute\n' + 'cluster" shall be an integer multiple greater than zero of the regular\n' + 'cluster dimensions. The device will attempt - on a best-effort basis - to\n' + 'group thread blocks into preferred clusters over grouping them into regular\n' + 'clusters. When it deems necessary (primarily when the device temporarily\n' + 'runs out of physical resources to launch the larger preferred clusters),\n' + 'the device may switch to launch the regular clusters instead to attempt to\n' + 'utilize as much of the physical device resources as possible.\n' + ' Each type of cluster will have its enumeration / coordinate setup as if\n' + 'the grid consists solely of its type of cluster. For example, if the\n' + 'preferred substitute cluster dimensions double the regular cluster\n' + 'dimensions, there might be simultaneously a regular cluster indexed at\n' + '(1,0,0), and a preferred cluster indexed at (1,0,0). In this example, the\n' + 'preferred substitute cluster (1,0,0) replaces regular clusters (2,0,0) and\n' + '(3,0,0) and groups their blocks.\n' + ' This attribute will only take effect when a regular cluster dimension has\n' + 'been specified. The preferred substitute cluster dimension must be an\n' + 'integer multiple greater than zero of the regular cluster dimension and\n' + 'must divide the grid. It must also be no more than `maxBlocksPerCluster`,\n' + "if it is set in the kernel's `__launch_bounds__`. Otherwise it must be less\n" + 'than the maximum value the driver can support. Otherwise, setting this\n' + 'attribute to a value physically unable to fit on any particular device is\n' + 'permitted.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT' in found_values}} - #: Valid for launches. Set - #: :py:obj:`~.CUlaunchAttributeValue.launchCompletionEvent` to record - #: the event. - #: Nominally, the event is triggered once all blocks of the kernel - #: have begun execution. Currently this is a best effort. If a kernel B - #: has a launch completion dependency on a kernel A, B may wait until A - #: is complete. Alternatively, blocks of B may begin before all blocks - #: of A have begun, for example if B can claim execution resources - #: unavailable to A (e.g. they run on different GPUs) or if B is a - #: higher priority than A. Exercise caution if such an ordering - #: inversion could lead to deadlock. - #: A launch completion event is nominally similar to a programmatic - #: event with `triggerAtBlockStart` set except that it is not visible - #: to `cudaGridDependencySynchronize()` and can be used with compute - #: capability less than 9.0. - #: The event supplied must not be an interprocess or interop event. - #: The event must disable timing (i.e. must be created with the - #: :py:obj:`~.CU_EVENT_DISABLE_TIMING` flag set). - CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT{{endif}} + CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT, + 'Valid for launches. Set\n' + ':py:obj:`~.CUlaunchAttributeValue.launchCompletionEvent` to record the\n' + 'event.\n' + ' Nominally, the event is triggered once all blocks of the kernel have begun\n' + 'execution. Currently this is a best effort. If a kernel B has a launch\n' + 'completion dependency on a kernel A, B may wait until A is complete.\n' + 'Alternatively, blocks of B may begin before all blocks of A have begun, for\n' + 'example if B can claim execution resources unavailable to A (e.g. they run\n' + 'on different GPUs) or if B is a higher priority than A. Exercise caution if\n' + 'such an ordering inversion could lead to deadlock.\n' + ' A launch completion event is nominally similar to a programmatic event\n' + 'with `triggerAtBlockStart` set except that it is not visible to\n' + '`cudaGridDependencySynchronize()` and can be used with compute capability\n' + 'less than 9.0.\n' + ' The event supplied must not be an interprocess or interop event. The event\n' + 'must disable timing (i.e. must be created with the\n' + ':py:obj:`~.CU_EVENT_DISABLE_TIMING` flag set).\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE' in found_values}} - #: Valid for graph nodes, launches. This attribute is graphs-only, and - #: passing it to a launch in a non-capturing stream will result in an - #: error. - #: :py:obj:`~.CUlaunchAttributeValue`::deviceUpdatableKernelNode::deviceUpdatable - #: can only be set to 0 or 1. Setting the field to 1 indicates that the - #: corresponding kernel node should be device-updatable. On success, a - #: handle will be returned via - #: :py:obj:`~.CUlaunchAttributeValue`::deviceUpdatableKernelNode::devNode - #: which can be passed to the various device-side update functions to - #: update the node's kernel parameters from within another kernel. For - #: more information on the types of device updates that can be made, as - #: well as the relevant limitations thereof, see - #: :py:obj:`~.cudaGraphKernelNodeUpdatesApply`. - #: Nodes which are device-updatable have additional restrictions - #: compared to regular kernel nodes. Firstly, device-updatable nodes - #: cannot be removed from their graph via - #: :py:obj:`~.cuGraphDestroyNode`. Additionally, once opted-in to this - #: functionality, a node cannot opt out, and any attempt to set the - #: deviceUpdatable attribute to 0 will result in an error. Device- - #: updatable kernel nodes also cannot have their attributes copied - #: to/from another kernel node via - #: :py:obj:`~.cuGraphKernelNodeCopyAttributes`. Graphs containing one - #: or more device-updatable nodes also do not allow multiple - #: instantiation, and neither the graph nor its instantiated version - #: can be passed to :py:obj:`~.cuGraphExecUpdate`. - #: If a graph contains device-updatable nodes and updates those nodes - #: from the device from within the graph, the graph must be uploaded - #: with :py:obj:`~.cuGraphUpload` before it is launched. For such a - #: graph, if host-side executable graph updates are made to the device- - #: updatable nodes, the graph must be uploaded before it is launched - #: again. - CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE{{endif}} + CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE, + 'Valid for graph nodes, launches. This attribute is graphs-only, and passing\n' + 'it to a launch in a non-capturing stream will result in an error.\n' + ':py:obj:`~.CUlaunchAttributeValue`::deviceUpdatableKernelNode::deviceUpdatable\n' + 'can only be set to 0 or 1. Setting the field to 1 indicates that the\n' + 'corresponding kernel node should be device-updatable. On success, a handle\n' + 'will be returned via\n' + ':py:obj:`~.CUlaunchAttributeValue`::deviceUpdatableKernelNode::devNode\n' + 'which can be passed to the various device-side update functions to update\n' + "the node's kernel parameters from within another kernel. For more\n" + 'information on the types of device updates that can be made, as well as the\n' + 'relevant limitations thereof, see\n' + ':py:obj:`~.cudaGraphKernelNodeUpdatesApply`.\n' + ' Nodes which are device-updatable have additional restrictions compared to\n' + 'regular kernel nodes. Firstly, device-updatable nodes cannot be removed\n' + 'from their graph via :py:obj:`~.cuGraphDestroyNode`. Additionally, once\n' + 'opted-in to this functionality, a node cannot opt out, and any attempt to\n' + 'set the deviceUpdatable attribute to 0 will result in an error. Device-\n' + 'updatable kernel nodes also cannot have their attributes copied to/from\n' + 'another kernel node via :py:obj:`~.cuGraphKernelNodeCopyAttributes`. Graphs\n' + 'containing one or more device-updatable nodes also do not allow multiple\n' + 'instantiation, and neither the graph nor its instantiated version can be\n' + 'passed to :py:obj:`~.cuGraphExecUpdate`.\n' + ' If a graph contains device-updatable nodes and updates those nodes from\n' + 'the device from within the graph, the graph must be uploaded with\n' + ':py:obj:`~.cuGraphUpload` before it is launched. For such a graph, if host-\n' + 'side executable graph updates are made to the device-updatable nodes, the\n' + 'graph must be uploaded before it is launched again.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT' in found_values}} - #: Valid for launches. On devices where the L1 cache and shared memory - #: use the same hardware resources, setting - #: :py:obj:`~.CUlaunchAttributeValue.sharedMemCarveout` to a percentage - #: between 0-100 signals the CUDA driver to set the shared memory - #: carveout preference, in percent of the total shared memory for that - #: kernel launch. This attribute takes precedence over - #: :py:obj:`~.CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT`. This - #: is only a hint, and the CUDA driver can choose a different - #: configuration if required for the launch. - CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT{{endif}} + CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT, + 'Valid for launches. On devices where the L1 cache and shared memory use the\n' + 'same hardware resources, setting\n' + ':py:obj:`~.CUlaunchAttributeValue.sharedMemCarveout` to a percentage\n' + 'between 0-100 signals the CUDA driver to set the shared memory carveout\n' + 'preference, in percent of the total shared memory for that kernel launch.\n' + 'This attribute takes precedence over\n' + ':py:obj:`~.CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT`. This is\n' + 'only a hint, and the CUDA driver can choose a different configuration if\n' + 'required for the launch.\n' + ){{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_NVLINK_UTIL_CENTRIC_SCHEDULING' in found_values}} - #: Valid for streams, graph nodes, launches. This attribute is a hint - #: to the CUDA runtime that the launch should attempt to make the - #: kernel maximize its NVLINK utilization. - #: - #: When possible to honor this hint, CUDA will assume each block in - #: the grid launch will carry out an even amount of NVLINK traffic, and - #: make a best-effort attempt to adjust the kernel launch based on that - #: assumption. - #: This attribute is a hint only. CUDA makes no functional or - #: performance guarantee. Its applicability can be affected by many - #: different factors, including driver version (i.e. CUDA doesn't - #: guarantee the performance characteristics will be maintained between - #: driver versions or a driver update could alter or regress previously - #: observed perf characteristics.) It also doesn't guarantee a - #: successful result, i.e. applying the attribute may not improve the - #: performance of either the targeted kernel or the encapsulating - #: application. - #: Valid values for - #: :py:obj:`~.CUlaunchAttributeValue`::nvlinkUtilCentricScheduling are - #: 0 (disabled) and 1 (enabled). - CU_LAUNCH_ATTRIBUTE_NVLINK_UTIL_CENTRIC_SCHEDULING = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_NVLINK_UTIL_CENTRIC_SCHEDULING{{endif}} - -_dict_CUlaunchAttributeID = dict(((int(v), v) for k, v in CUlaunchAttributeID.__members__.items())) + CU_LAUNCH_ATTRIBUTE_NVLINK_UTIL_CENTRIC_SCHEDULING = ( + cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_NVLINK_UTIL_CENTRIC_SCHEDULING, + 'Valid for streams, graph nodes, launches. This attribute is a hint to the\n' + 'CUDA runtime that the launch should attempt to make the kernel maximize its\n' + 'NVLINK utilization.\n' + ' When possible to honor this hint, CUDA will assume each block in the grid\n' + 'launch will carry out an even amount of NVLINK traffic, and make a best-\n' + 'effort attempt to adjust the kernel launch based on that assumption.\n' + ' This attribute is a hint only. CUDA makes no functional or performance\n' + 'guarantee. Its applicability can be affected by many different factors,\n' + "including driver version (i.e. CUDA doesn't guarantee the performance\n" + 'characteristics will be maintained between driver versions or a driver\n' + 'update could alter or regress previously observed perf characteristics.) It\n' + "also doesn't guarantee a successful result, i.e. applying the attribute may\n" + 'not improve the performance of either the targeted kernel or the\n' + 'encapsulating application.\n' + ' Valid values for\n' + ':py:obj:`~.CUlaunchAttributeValue`::nvlinkUtilCentricScheduling are 0\n' + '(disabled) and 1 (enabled).\n' + ){{endif}} + {{endif}} {{if 'CUmemGenericAllocationHandle' in found_types}} @@ -8393,9 +9978,7 @@ cdef class CUstreamMemOpWaitValueParams_st: {{if 'CUstreamBatchMemOpParams_union.waitValue.operation' in found_struct}} @property def operation(self): - if self._pvt_ptr[0].waitValue.operation not in _dict_CUstreamBatchMemOpType: - return None - return _dict_CUstreamBatchMemOpType[self._pvt_ptr[0].waitValue.operation] + return CUstreamBatchMemOpType(self._pvt_ptr[0].waitValue.operation) @operation.setter def operation(self, operation not None : CUstreamBatchMemOpType): self._pvt_ptr[0].waitValue.operation = int(operation) @@ -8583,9 +10166,7 @@ cdef class CUstreamMemOpWriteValueParams_st: {{if 'CUstreamBatchMemOpParams_union.writeValue.operation' in found_struct}} @property def operation(self): - if self._pvt_ptr[0].writeValue.operation not in _dict_CUstreamBatchMemOpType: - return None - return _dict_CUstreamBatchMemOpType[self._pvt_ptr[0].writeValue.operation] + return CUstreamBatchMemOpType(self._pvt_ptr[0].writeValue.operation) @operation.setter def operation(self, operation not None : CUstreamBatchMemOpType): self._pvt_ptr[0].writeValue.operation = int(operation) @@ -8721,9 +10302,7 @@ cdef class CUstreamMemOpFlushRemoteWritesParams_st: {{if 'CUstreamBatchMemOpParams_union.flushRemoteWrites.operation' in found_struct}} @property def operation(self): - if self._pvt_ptr[0].flushRemoteWrites.operation not in _dict_CUstreamBatchMemOpType: - return None - return _dict_CUstreamBatchMemOpType[self._pvt_ptr[0].flushRemoteWrites.operation] + return CUstreamBatchMemOpType(self._pvt_ptr[0].flushRemoteWrites.operation) @operation.setter def operation(self, operation not None : CUstreamBatchMemOpType): self._pvt_ptr[0].flushRemoteWrites.operation = int(operation) @@ -8787,9 +10366,7 @@ cdef class CUstreamMemOpMemoryBarrierParams_st: {{if 'CUstreamBatchMemOpParams_union.memoryBarrier.operation' in found_struct}} @property def operation(self): - if self._pvt_ptr[0].memoryBarrier.operation not in _dict_CUstreamBatchMemOpType: - return None - return _dict_CUstreamBatchMemOpType[self._pvt_ptr[0].memoryBarrier.operation] + return CUstreamBatchMemOpType(self._pvt_ptr[0].memoryBarrier.operation) @operation.setter def operation(self, operation not None : CUstreamBatchMemOpType): self._pvt_ptr[0].memoryBarrier.operation = int(operation) @@ -8912,9 +10489,7 @@ cdef class CUstreamMemOpAtomicReductionParams_st: {{if 'CUstreamBatchMemOpParams_union.atomicReduction.operation' in found_struct}} @property def operation(self): - if self._pvt_ptr[0].atomicReduction.operation not in _dict_CUstreamBatchMemOpType: - return None - return _dict_CUstreamBatchMemOpType[self._pvt_ptr[0].atomicReduction.operation] + return CUstreamBatchMemOpType(self._pvt_ptr[0].atomicReduction.operation) @operation.setter def operation(self, operation not None : CUstreamBatchMemOpType): self._pvt_ptr[0].atomicReduction.operation = int(operation) @@ -8930,9 +10505,7 @@ cdef class CUstreamMemOpAtomicReductionParams_st: {{if 'CUstreamBatchMemOpParams_union.atomicReduction.reductionOp' in found_struct}} @property def reductionOp(self): - if self._pvt_ptr[0].atomicReduction.reductionOp not in _dict_CUstreamAtomicReductionOpType: - return None - return _dict_CUstreamAtomicReductionOpType[self._pvt_ptr[0].atomicReduction.reductionOp] + return CUstreamAtomicReductionOpType(self._pvt_ptr[0].atomicReduction.reductionOp) @reductionOp.setter def reductionOp(self, reductionOp not None : CUstreamAtomicReductionOpType): self._pvt_ptr[0].atomicReduction.reductionOp = int(reductionOp) @@ -8940,9 +10513,7 @@ cdef class CUstreamMemOpAtomicReductionParams_st: {{if 'CUstreamBatchMemOpParams_union.atomicReduction.dataType' in found_struct}} @property def dataType(self): - if self._pvt_ptr[0].atomicReduction.dataType not in _dict_CUstreamAtomicReductionDataType: - return None - return _dict_CUstreamAtomicReductionDataType[self._pvt_ptr[0].atomicReduction.dataType] + return CUstreamAtomicReductionDataType(self._pvt_ptr[0].atomicReduction.dataType) @dataType.setter def dataType(self, dataType not None : CUstreamAtomicReductionDataType): self._pvt_ptr[0].atomicReduction.dataType = int(dataType) @@ -9124,9 +10695,7 @@ cdef class CUstreamBatchMemOpParams_union: {{if 'CUstreamBatchMemOpParams_union.operation' in found_struct}} @property def operation(self): - if self._pvt_ptr[0].operation not in _dict_CUstreamBatchMemOpType: - return None - return _dict_CUstreamBatchMemOpType[self._pvt_ptr[0].operation] + return CUstreamBatchMemOpType(self._pvt_ptr[0].operation) @operation.setter def operation(self, operation not None : CUstreamBatchMemOpType): self._pvt_ptr[0].operation = int(operation) @@ -9607,9 +11176,7 @@ cdef class CUasyncNotificationInfo_st: {{if 'CUasyncNotificationInfo_st.type' in found_struct}} @property def type(self): - if self._pvt_ptr[0].type not in _dict_CUasyncNotificationType: - return None - return _dict_CUasyncNotificationType[self._pvt_ptr[0].type] + return CUasyncNotificationType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : CUasyncNotificationType): self._pvt_ptr[0].type = int(type) @@ -9956,9 +11523,7 @@ cdef class CUaccessPolicyWindow_st: {{if 'CUaccessPolicyWindow_st.hitProp' in found_struct}} @property def hitProp(self): - if self._pvt_ptr[0].hitProp not in _dict_CUaccessProperty: - return None - return _dict_CUaccessProperty[self._pvt_ptr[0].hitProp] + return CUaccessProperty(self._pvt_ptr[0].hitProp) @hitProp.setter def hitProp(self, hitProp not None : CUaccessProperty): self._pvt_ptr[0].hitProp = int(hitProp) @@ -9966,9 +11531,7 @@ cdef class CUaccessPolicyWindow_st: {{if 'CUaccessPolicyWindow_st.missProp' in found_struct}} @property def missProp(self): - if self._pvt_ptr[0].missProp not in _dict_CUaccessProperty: - return None - return _dict_CUaccessProperty[self._pvt_ptr[0].missProp] + return CUaccessProperty(self._pvt_ptr[0].missProp) @missProp.setter def missProp(self, missProp not None : CUaccessProperty): self._pvt_ptr[0].missProp = int(missProp) @@ -11398,9 +12961,7 @@ cdef class CUDA_CONDITIONAL_NODE_PARAMS: {{if 'CUDA_CONDITIONAL_NODE_PARAMS.type' in found_struct}} @property def type(self): - if self._pvt_ptr[0].type not in _dict_CUgraphConditionalNodeType: - return None - return _dict_CUgraphConditionalNodeType[self._pvt_ptr[0].type] + return CUgraphConditionalNodeType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : CUgraphConditionalNodeType): self._pvt_ptr[0].type = int(type) @@ -11698,9 +13259,7 @@ cdef class CUDA_GRAPH_INSTANTIATE_PARAMS_st: {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.result_out' in found_struct}} @property def result_out(self): - if self._pvt_ptr[0].result_out not in _dict_CUgraphInstantiateResult: - return None - return _dict_CUgraphInstantiateResult[self._pvt_ptr[0].result_out] + return CUgraphInstantiateResult(self._pvt_ptr[0].result_out) @result_out.setter def result_out(self, result_out not None : CUgraphInstantiateResult): self._pvt_ptr[0].result_out = int(result_out) @@ -12481,9 +14040,7 @@ cdef class CUlaunchAttributeValue_union: {{if 'CUlaunchAttributeValue_union.syncPolicy' in found_struct}} @property def syncPolicy(self): - if self._pvt_ptr[0].syncPolicy not in _dict_CUsynchronizationPolicy: - return None - return _dict_CUsynchronizationPolicy[self._pvt_ptr[0].syncPolicy] + return CUsynchronizationPolicy(self._pvt_ptr[0].syncPolicy) @syncPolicy.setter def syncPolicy(self, syncPolicy not None : CUsynchronizationPolicy): self._pvt_ptr[0].syncPolicy = int(syncPolicy) @@ -12499,9 +14056,7 @@ cdef class CUlaunchAttributeValue_union: {{if 'CUlaunchAttributeValue_union.clusterSchedulingPolicyPreference' in found_struct}} @property def clusterSchedulingPolicyPreference(self): - if self._pvt_ptr[0].clusterSchedulingPolicyPreference not in _dict_CUclusterSchedulingPolicy: - return None - return _dict_CUclusterSchedulingPolicy[self._pvt_ptr[0].clusterSchedulingPolicyPreference] + return CUclusterSchedulingPolicy(self._pvt_ptr[0].clusterSchedulingPolicyPreference) @clusterSchedulingPolicyPreference.setter def clusterSchedulingPolicyPreference(self, clusterSchedulingPolicyPreference not None : CUclusterSchedulingPolicy): self._pvt_ptr[0].clusterSchedulingPolicyPreference = int(clusterSchedulingPolicyPreference) @@ -12549,9 +14104,7 @@ cdef class CUlaunchAttributeValue_union: {{if 'CUlaunchAttributeValue_union.memSyncDomain' in found_struct}} @property def memSyncDomain(self): - if self._pvt_ptr[0].memSyncDomain not in _dict_CUlaunchMemSyncDomain: - return None - return _dict_CUlaunchMemSyncDomain[self._pvt_ptr[0].memSyncDomain] + return CUlaunchMemSyncDomain(self._pvt_ptr[0].memSyncDomain) @memSyncDomain.setter def memSyncDomain(self, memSyncDomain not None : CUlaunchMemSyncDomain): self._pvt_ptr[0].memSyncDomain = int(memSyncDomain) @@ -12646,9 +14199,7 @@ cdef class CUlaunchAttribute_st: {{if 'CUlaunchAttribute_st.id' in found_struct}} @property def id(self): - if self._pvt_ptr[0].id not in _dict_CUlaunchAttributeID: - return None - return _dict_CUlaunchAttributeID[self._pvt_ptr[0].id] + return CUlaunchAttributeID(self._pvt_ptr[0].id) @id.setter def id(self, id not None : CUlaunchAttributeID): self._pvt_ptr[0].id = int(id) @@ -13063,9 +14614,7 @@ cdef class CUexecAffinityParam_st: {{if 'CUexecAffinityParam_st.type' in found_struct}} @property def type(self): - if self._pvt_ptr[0].type not in _dict_CUexecAffinityType: - return None - return _dict_CUexecAffinityType[self._pvt_ptr[0].type] + return CUexecAffinityType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : CUexecAffinityType): self._pvt_ptr[0].type = int(type) @@ -13133,9 +14682,7 @@ cdef class CUctxCigParam_st: {{if 'CUctxCigParam_st.sharedDataType' in found_struct}} @property def sharedDataType(self): - if self._pvt_ptr[0].sharedDataType not in _dict_CUcigDataType: - return None - return _dict_CUcigDataType[self._pvt_ptr[0].sharedDataType] + return CUcigDataType(self._pvt_ptr[0].sharedDataType) @sharedDataType.setter def sharedDataType(self, sharedDataType not None : CUcigDataType): self._pvt_ptr[0].sharedDataType = int(sharedDataType) @@ -13601,9 +15148,7 @@ cdef class CUDA_MEMCPY2D_st: {{if 'CUDA_MEMCPY2D_st.srcMemoryType' in found_struct}} @property def srcMemoryType(self): - if self._pvt_ptr[0].srcMemoryType not in _dict_CUmemorytype: - return None - return _dict_CUmemorytype[self._pvt_ptr[0].srcMemoryType] + return CUmemorytype(self._pvt_ptr[0].srcMemoryType) @srcMemoryType.setter def srcMemoryType(self, srcMemoryType not None : CUmemorytype): self._pvt_ptr[0].srcMemoryType = int(srcMemoryType) @@ -13679,9 +15224,7 @@ cdef class CUDA_MEMCPY2D_st: {{if 'CUDA_MEMCPY2D_st.dstMemoryType' in found_struct}} @property def dstMemoryType(self): - if self._pvt_ptr[0].dstMemoryType not in _dict_CUmemorytype: - return None - return _dict_CUmemorytype[self._pvt_ptr[0].dstMemoryType] + return CUmemorytype(self._pvt_ptr[0].dstMemoryType) @dstMemoryType.setter def dstMemoryType(self, dstMemoryType not None : CUmemorytype): self._pvt_ptr[0].dstMemoryType = int(dstMemoryType) @@ -14084,9 +15627,7 @@ cdef class CUDA_MEMCPY3D_st: {{if 'CUDA_MEMCPY3D_st.srcMemoryType' in found_struct}} @property def srcMemoryType(self): - if self._pvt_ptr[0].srcMemoryType not in _dict_CUmemorytype: - return None - return _dict_CUmemorytype[self._pvt_ptr[0].srcMemoryType] + return CUmemorytype(self._pvt_ptr[0].srcMemoryType) @srcMemoryType.setter def srcMemoryType(self, srcMemoryType not None : CUmemorytype): self._pvt_ptr[0].srcMemoryType = int(srcMemoryType) @@ -14195,9 +15736,7 @@ cdef class CUDA_MEMCPY3D_st: {{if 'CUDA_MEMCPY3D_st.dstMemoryType' in found_struct}} @property def dstMemoryType(self): - if self._pvt_ptr[0].dstMemoryType not in _dict_CUmemorytype: - return None - return _dict_CUmemorytype[self._pvt_ptr[0].dstMemoryType] + return CUmemorytype(self._pvt_ptr[0].dstMemoryType) @dstMemoryType.setter def dstMemoryType(self, dstMemoryType not None : CUmemorytype): self._pvt_ptr[0].dstMemoryType = int(dstMemoryType) @@ -14632,9 +16171,7 @@ cdef class CUDA_MEMCPY3D_PEER_st: {{if 'CUDA_MEMCPY3D_PEER_st.srcMemoryType' in found_struct}} @property def srcMemoryType(self): - if self._pvt_ptr[0].srcMemoryType not in _dict_CUmemorytype: - return None - return _dict_CUmemorytype[self._pvt_ptr[0].srcMemoryType] + return CUmemorytype(self._pvt_ptr[0].srcMemoryType) @srcMemoryType.setter def srcMemoryType(self, srcMemoryType not None : CUmemorytype): self._pvt_ptr[0].srcMemoryType = int(srcMemoryType) @@ -14751,9 +16288,7 @@ cdef class CUDA_MEMCPY3D_PEER_st: {{if 'CUDA_MEMCPY3D_PEER_st.dstMemoryType' in found_struct}} @property def dstMemoryType(self): - if self._pvt_ptr[0].dstMemoryType not in _dict_CUmemorytype: - return None - return _dict_CUmemorytype[self._pvt_ptr[0].dstMemoryType] + return CUmemorytype(self._pvt_ptr[0].dstMemoryType) @dstMemoryType.setter def dstMemoryType(self, dstMemoryType not None : CUmemorytype): self._pvt_ptr[0].dstMemoryType = int(dstMemoryType) @@ -15069,9 +16604,7 @@ cdef class CUDA_ARRAY_DESCRIPTOR_st: {{if 'CUDA_ARRAY_DESCRIPTOR_st.Format' in found_struct}} @property def Format(self): - if self._pvt_ptr[0].Format not in _dict_CUarray_format: - return None - return _dict_CUarray_format[self._pvt_ptr[0].Format] + return CUarray_format(self._pvt_ptr[0].Format) @Format.setter def Format(self, Format not None : CUarray_format): self._pvt_ptr[0].Format = int(Format) @@ -15203,9 +16736,7 @@ cdef class CUDA_ARRAY3D_DESCRIPTOR_st: {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Format' in found_struct}} @property def Format(self): - if self._pvt_ptr[0].Format not in _dict_CUarray_format: - return None - return _dict_CUarray_format[self._pvt_ptr[0].Format] + return CUarray_format(self._pvt_ptr[0].Format) @Format.setter def Format(self, Format not None : CUarray_format): self._pvt_ptr[0].Format = int(Format) @@ -15728,9 +17259,7 @@ cdef class anon_struct9: {{if 'CUDA_RESOURCE_DESC_st.res.linear.format' in found_struct}} @property def format(self): - if self._pvt_ptr[0].res.linear.format not in _dict_CUarray_format: - return None - return _dict_CUarray_format[self._pvt_ptr[0].res.linear.format] + return CUarray_format(self._pvt_ptr[0].res.linear.format) @format.setter def format(self, format not None : CUarray_format): self._pvt_ptr[0].res.linear.format = int(format) @@ -15863,9 +17392,7 @@ cdef class anon_struct10: {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.format' in found_struct}} @property def format(self): - if self._pvt_ptr[0].res.pitch2D.format not in _dict_CUarray_format: - return None - return _dict_CUarray_format[self._pvt_ptr[0].res.pitch2D.format] + return CUarray_format(self._pvt_ptr[0].res.pitch2D.format) @format.setter def format(self, format not None : CUarray_format): self._pvt_ptr[0].res.pitch2D.format = int(format) @@ -16151,9 +17678,7 @@ cdef class CUDA_RESOURCE_DESC_st: {{if 'CUDA_RESOURCE_DESC_st.resType' in found_struct}} @property def resType(self): - if self._pvt_ptr[0].resType not in _dict_CUresourcetype: - return None - return _dict_CUresourcetype[self._pvt_ptr[0].resType] + return CUresourcetype(self._pvt_ptr[0].resType) @resType.setter def resType(self, resType not None : CUresourcetype): self._pvt_ptr[0].resType = int(resType) @@ -16309,7 +17834,7 @@ cdef class CUDA_TEXTURE_DESC_st: {{if 'CUDA_TEXTURE_DESC_st.addressMode' in found_struct}} @property def addressMode(self): - return [_dict_CUaddress_mode[_x] if _x in _dict_CUaddress_mode else None for _x in list(self._pvt_ptr[0].addressMode)] + return [CUaddress_mode(_x) for _x in list(self._pvt_ptr[0].addressMode)] @addressMode.setter def addressMode(self, addressMode): self._pvt_ptr[0].addressMode = [int(_x) for _x in addressMode] @@ -16317,9 +17842,7 @@ cdef class CUDA_TEXTURE_DESC_st: {{if 'CUDA_TEXTURE_DESC_st.filterMode' in found_struct}} @property def filterMode(self): - if self._pvt_ptr[0].filterMode not in _dict_CUfilter_mode: - return None - return _dict_CUfilter_mode[self._pvt_ptr[0].filterMode] + return CUfilter_mode(self._pvt_ptr[0].filterMode) @filterMode.setter def filterMode(self, filterMode not None : CUfilter_mode): self._pvt_ptr[0].filterMode = int(filterMode) @@ -16343,9 +17866,7 @@ cdef class CUDA_TEXTURE_DESC_st: {{if 'CUDA_TEXTURE_DESC_st.mipmapFilterMode' in found_struct}} @property def mipmapFilterMode(self): - if self._pvt_ptr[0].mipmapFilterMode not in _dict_CUfilter_mode: - return None - return _dict_CUfilter_mode[self._pvt_ptr[0].mipmapFilterMode] + return CUfilter_mode(self._pvt_ptr[0].mipmapFilterMode) @mipmapFilterMode.setter def mipmapFilterMode(self, mipmapFilterMode not None : CUfilter_mode): self._pvt_ptr[0].mipmapFilterMode = int(mipmapFilterMode) @@ -16515,9 +18036,7 @@ cdef class CUDA_RESOURCE_VIEW_DESC_st: {{if 'CUDA_RESOURCE_VIEW_DESC_st.format' in found_struct}} @property def format(self): - if self._pvt_ptr[0].format not in _dict_CUresourceViewFormat: - return None - return _dict_CUresourceViewFormat[self._pvt_ptr[0].format] + return CUresourceViewFormat(self._pvt_ptr[0].format) @format.setter def format(self, format not None : CUresourceViewFormat): self._pvt_ptr[0].format = int(format) @@ -17185,9 +18704,7 @@ cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st: {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.type' in found_struct}} @property def type(self): - if self._pvt_ptr[0].type not in _dict_CUexternalMemoryHandleType: - return None - return _dict_CUexternalMemoryHandleType[self._pvt_ptr[0].type] + return CUexternalMemoryHandleType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : CUexternalMemoryHandleType): self._pvt_ptr[0].type = int(type) @@ -17668,9 +19185,7 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st: {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.type' in found_struct}} @property def type(self): - if self._pvt_ptr[0].type not in _dict_CUexternalSemaphoreHandleType: - return None - return _dict_CUexternalSemaphoreHandleType[self._pvt_ptr[0].type] + return CUexternalSemaphoreHandleType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : CUexternalSemaphoreHandleType): self._pvt_ptr[0].type = int(type) @@ -19569,9 +21084,7 @@ cdef class CUarrayMapInfo_st: {{if 'CUarrayMapInfo_st.resourceType' in found_struct}} @property def resourceType(self): - if self._pvt_ptr[0].resourceType not in _dict_CUresourcetype: - return None - return _dict_CUresourcetype[self._pvt_ptr[0].resourceType] + return CUresourcetype(self._pvt_ptr[0].resourceType) @resourceType.setter def resourceType(self, resourceType not None : CUresourcetype): self._pvt_ptr[0].resourceType = int(resourceType) @@ -19587,9 +21100,7 @@ cdef class CUarrayMapInfo_st: {{if 'CUarrayMapInfo_st.subresourceType' in found_struct}} @property def subresourceType(self): - if self._pvt_ptr[0].subresourceType not in _dict_CUarraySparseSubresourceType: - return None - return _dict_CUarraySparseSubresourceType[self._pvt_ptr[0].subresourceType] + return CUarraySparseSubresourceType(self._pvt_ptr[0].subresourceType) @subresourceType.setter def subresourceType(self, subresourceType not None : CUarraySparseSubresourceType): self._pvt_ptr[0].subresourceType = int(subresourceType) @@ -19605,9 +21116,7 @@ cdef class CUarrayMapInfo_st: {{if 'CUarrayMapInfo_st.memOperationType' in found_struct}} @property def memOperationType(self): - if self._pvt_ptr[0].memOperationType not in _dict_CUmemOperationType: - return None - return _dict_CUmemOperationType[self._pvt_ptr[0].memOperationType] + return CUmemOperationType(self._pvt_ptr[0].memOperationType) @memOperationType.setter def memOperationType(self, memOperationType not None : CUmemOperationType): self._pvt_ptr[0].memOperationType = int(memOperationType) @@ -19615,9 +21124,7 @@ cdef class CUarrayMapInfo_st: {{if 'CUarrayMapInfo_st.memHandleType' in found_struct}} @property def memHandleType(self): - if self._pvt_ptr[0].memHandleType not in _dict_CUmemHandleType: - return None - return _dict_CUmemHandleType[self._pvt_ptr[0].memHandleType] + return CUmemHandleType(self._pvt_ptr[0].memHandleType) @memHandleType.setter def memHandleType(self, memHandleType not None : CUmemHandleType): self._pvt_ptr[0].memHandleType = int(memHandleType) @@ -19717,9 +21224,7 @@ cdef class CUmemLocation_st: {{if 'CUmemLocation_st.type' in found_struct}} @property def type(self): - if self._pvt_ptr[0].type not in _dict_CUmemLocationType: - return None - return _dict_CUmemLocationType[self._pvt_ptr[0].type] + return CUmemLocationType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : CUmemLocationType): self._pvt_ptr[0].type = int(type) @@ -19930,9 +21435,7 @@ cdef class CUmemAllocationProp_st: {{if 'CUmemAllocationProp_st.type' in found_struct}} @property def type(self): - if self._pvt_ptr[0].type not in _dict_CUmemAllocationType: - return None - return _dict_CUmemAllocationType[self._pvt_ptr[0].type] + return CUmemAllocationType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : CUmemAllocationType): self._pvt_ptr[0].type = int(type) @@ -19940,9 +21443,7 @@ cdef class CUmemAllocationProp_st: {{if 'CUmemAllocationProp_st.requestedHandleTypes' in found_struct}} @property def requestedHandleTypes(self): - if self._pvt_ptr[0].requestedHandleTypes not in _dict_CUmemAllocationHandleType: - return None - return _dict_CUmemAllocationHandleType[self._pvt_ptr[0].requestedHandleTypes] + return CUmemAllocationHandleType(self._pvt_ptr[0].requestedHandleTypes) @requestedHandleTypes.setter def requestedHandleTypes(self, requestedHandleTypes not None : CUmemAllocationHandleType): self._pvt_ptr[0].requestedHandleTypes = int(requestedHandleTypes) @@ -20145,9 +21646,7 @@ cdef class CUmemAccessDesc_st: {{if 'CUmemAccessDesc_st.flags' in found_struct}} @property def flags(self): - if self._pvt_ptr[0].flags not in _dict_CUmemAccess_flags: - return None - return _dict_CUmemAccess_flags[self._pvt_ptr[0].flags] + return CUmemAccess_flags(self._pvt_ptr[0].flags) @flags.setter def flags(self, flags not None : CUmemAccess_flags): self._pvt_ptr[0].flags = int(flags) @@ -20226,9 +21725,7 @@ cdef class CUgraphExecUpdateResultInfo_st: {{if 'CUgraphExecUpdateResultInfo_st.result' in found_struct}} @property def result(self): - if self._pvt_ptr[0].result not in _dict_CUgraphExecUpdateResult: - return None - return _dict_CUgraphExecUpdateResult[self._pvt_ptr[0].result] + return CUgraphExecUpdateResult(self._pvt_ptr[0].result) @result.setter def result(self, result not None : CUgraphExecUpdateResult): self._pvt_ptr[0].result = int(result) @@ -20381,9 +21878,7 @@ cdef class CUmemPoolProps_st: {{if 'CUmemPoolProps_st.allocType' in found_struct}} @property def allocType(self): - if self._pvt_ptr[0].allocType not in _dict_CUmemAllocationType: - return None - return _dict_CUmemAllocationType[self._pvt_ptr[0].allocType] + return CUmemAllocationType(self._pvt_ptr[0].allocType) @allocType.setter def allocType(self, allocType not None : CUmemAllocationType): self._pvt_ptr[0].allocType = int(allocType) @@ -20391,9 +21886,7 @@ cdef class CUmemPoolProps_st: {{if 'CUmemPoolProps_st.handleTypes' in found_struct}} @property def handleTypes(self): - if self._pvt_ptr[0].handleTypes not in _dict_CUmemAllocationHandleType: - return None - return _dict_CUmemAllocationHandleType[self._pvt_ptr[0].handleTypes] + return CUmemAllocationHandleType(self._pvt_ptr[0].handleTypes) @handleTypes.setter def handleTypes(self, handleTypes not None : CUmemAllocationHandleType): self._pvt_ptr[0].handleTypes = int(handleTypes) @@ -20580,9 +22073,7 @@ cdef class CUmemcpyAttributes_st: {{if 'CUmemcpyAttributes_st.srcAccessOrder' in found_struct}} @property def srcAccessOrder(self): - if self._pvt_ptr[0].srcAccessOrder not in _dict_CUmemcpySrcAccessOrder: - return None - return _dict_CUmemcpySrcAccessOrder[self._pvt_ptr[0].srcAccessOrder] + return CUmemcpySrcAccessOrder(self._pvt_ptr[0].srcAccessOrder) @srcAccessOrder.setter def srcAccessOrder(self, srcAccessOrder not None : CUmemcpySrcAccessOrder): self._pvt_ptr[0].srcAccessOrder = int(srcAccessOrder) @@ -21108,9 +22599,7 @@ cdef class CUmemcpy3DOperand_st: {{if 'CUmemcpy3DOperand_st.type' in found_struct}} @property def type(self): - if self._pvt_ptr[0].type not in _dict_CUmemcpy3DOperandType: - return None - return _dict_CUmemcpy3DOperandType[self._pvt_ptr[0].type] + return CUmemcpy3DOperandType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : CUmemcpy3DOperandType): self._pvt_ptr[0].type = int(type) @@ -21240,9 +22729,7 @@ cdef class CUDA_MEMCPY3D_BATCH_OP_st: {{if 'CUDA_MEMCPY3D_BATCH_OP_st.srcAccessOrder' in found_struct}} @property def srcAccessOrder(self): - if self._pvt_ptr[0].srcAccessOrder not in _dict_CUmemcpySrcAccessOrder: - return None - return _dict_CUmemcpySrcAccessOrder[self._pvt_ptr[0].srcAccessOrder] + return CUmemcpySrcAccessOrder(self._pvt_ptr[0].srcAccessOrder) @srcAccessOrder.setter def srcAccessOrder(self, srcAccessOrder not None : CUmemcpySrcAccessOrder): self._pvt_ptr[0].srcAccessOrder = int(srcAccessOrder) @@ -21719,9 +23206,7 @@ cdef class CUDA_CHILD_GRAPH_NODE_PARAMS_st: {{if 'CUDA_CHILD_GRAPH_NODE_PARAMS_st.ownership' in found_struct}} @property def ownership(self): - if self._pvt_ptr[0].ownership not in _dict_CUgraphChildGraphNodeOwnership: - return None - return _dict_CUgraphChildGraphNodeOwnership[self._pvt_ptr[0].ownership] + return CUgraphChildGraphNodeOwnership(self._pvt_ptr[0].ownership) @ownership.setter def ownership(self, ownership not None : CUgraphChildGraphNodeOwnership): self._pvt_ptr[0].ownership = int(ownership) @@ -22096,9 +23581,7 @@ cdef class CUgraphNodeParams_st: {{if 'CUgraphNodeParams_st.type' in found_struct}} @property def type(self): - if self._pvt_ptr[0].type not in _dict_CUgraphNodeType: - return None - return _dict_CUgraphNodeType[self._pvt_ptr[0].type] + return CUgraphNodeType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : CUgraphNodeType): self._pvt_ptr[0].type = int(type) @@ -22797,9 +24280,7 @@ cdef class CUmemDecompressParams_st: {{if 'CUmemDecompressParams_st.algo' in found_struct}} @property def algo(self): - if self._pvt_ptr[0].algo not in _dict_CUmemDecompressAlgorithm: - return None - return _dict_CUmemDecompressAlgorithm[self._pvt_ptr[0].algo] + return CUmemDecompressAlgorithm(self._pvt_ptr[0].algo) @algo.setter def algo(self, algo not None : CUmemDecompressAlgorithm): self._pvt_ptr[0].algo = int(algo) @@ -23014,9 +24495,7 @@ cdef class CUdevWorkqueueConfigResource_st: {{if 'CUdevWorkqueueConfigResource_st.sharingScope' in found_struct}} @property def sharingScope(self): - if self._pvt_ptr[0].sharingScope not in _dict_CUdevWorkqueueConfigScope: - return None - return _dict_CUdevWorkqueueConfigScope[self._pvt_ptr[0].sharingScope] + return CUdevWorkqueueConfigScope(self._pvt_ptr[0].sharingScope) @sharingScope.setter def sharingScope(self, sharingScope not None : CUdevWorkqueueConfigScope): self._pvt_ptr[0].sharingScope = int(sharingScope) @@ -23315,9 +24794,7 @@ cdef class CUdevResource_st: {{if 'CUdevResource_st.type' in found_struct}} @property def type(self): - if self._pvt_ptr[0].type not in _dict_CUdevResourceType: - return None - return _dict_CUdevResourceType[self._pvt_ptr[0].type] + return CUdevResourceType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : CUdevResourceType): self._pvt_ptr[0].type = int(type) @@ -23662,9 +25139,7 @@ cdef class CUeglFrame_st: {{if True}} @property def frameType(self): - if self._pvt_ptr[0].frameType not in _dict_CUeglFrameType: - return None - return _dict_CUeglFrameType[self._pvt_ptr[0].frameType] + return CUeglFrameType(self._pvt_ptr[0].frameType) @frameType.setter def frameType(self, frameType not None : CUeglFrameType): self._pvt_ptr[0].frameType = int(frameType) @@ -23672,9 +25147,7 @@ cdef class CUeglFrame_st: {{if True}} @property def eglColorFormat(self): - if self._pvt_ptr[0].eglColorFormat not in _dict_CUeglColorFormat: - return None - return _dict_CUeglColorFormat[self._pvt_ptr[0].eglColorFormat] + return CUeglColorFormat(self._pvt_ptr[0].eglColorFormat) @eglColorFormat.setter def eglColorFormat(self, eglColorFormat not None : CUeglColorFormat): self._pvt_ptr[0].eglColorFormat = int(eglColorFormat) @@ -23682,9 +25155,7 @@ cdef class CUeglFrame_st: {{if True}} @property def cuFormat(self): - if self._pvt_ptr[0].cuFormat not in _dict_CUarray_format: - return None - return _dict_CUarray_format[self._pvt_ptr[0].cuFormat] + return CUarray_format(self._pvt_ptr[0].cuFormat) @cuFormat.setter def cuFormat(self, cuFormat not None : CUarray_format): self._pvt_ptr[0].cuFormat = int(cuFormat) @@ -24150,8 +25621,8 @@ def cuGetErrorString(error not None : CUresult): with nogil: err = cydriver.cuGetErrorString(cyerror, &pStr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pStr if pStr != NULL else None) + return (CUresult(err), None) + return (CUresult(err), pStr if pStr != NULL else None) {{endif}} {{if 'cuGetErrorName' in found_functions}} @@ -24186,8 +25657,8 @@ def cuGetErrorName(error not None : CUresult): with nogil: err = cydriver.cuGetErrorName(cyerror, &pStr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pStr if pStr != NULL else None) + return (CUresult(err), None) + return (CUresult(err), pStr if pStr != NULL else None) {{endif}} {{if 'cuInit' in found_functions}} @@ -24214,7 +25685,7 @@ def cuInit(unsigned int Flags): """ with nogil: err = cydriver.cuInit(Flags) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuDriverGetVersion' in found_functions}} @@ -24245,8 +25716,8 @@ def cuDriverGetVersion(): with nogil: err = cydriver.cuDriverGetVersion(&driverVersion) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], driverVersion) + return (CUresult(err), None) + return (CUresult(err), driverVersion) {{endif}} {{if 'cuDeviceGet' in found_functions}} @@ -24278,8 +25749,8 @@ def cuDeviceGet(int ordinal): with nogil: err = cydriver.cuDeviceGet(device._pvt_ptr, ordinal) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], device) + return (CUresult(err), None) + return (CUresult(err), device) {{endif}} {{if 'cuDeviceGetCount' in found_functions}} @@ -24307,8 +25778,8 @@ def cuDeviceGetCount(): with nogil: err = cydriver.cuDeviceGetCount(&count) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], count) + return (CUresult(err), None) + return (CUresult(err), count) {{endif}} {{if 'cuDeviceGetName' in found_functions}} @@ -24353,8 +25824,8 @@ def cuDeviceGetName(int length, dev): with nogil: err = cydriver.cuDeviceGetName(name, length, cydev) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pyname) + return (CUresult(err), None) + return (CUresult(err), pyname) {{endif}} {{if 'cuDeviceGetUuid_v2' in found_functions}} @@ -24395,8 +25866,8 @@ def cuDeviceGetUuid(dev): with nogil: err = cydriver.cuDeviceGetUuid(uuid._pvt_ptr, cydev) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], uuid) + return (CUresult(err), None) + return (CUresult(err), uuid) {{endif}} {{if 'cuDeviceGetLuid' in found_functions}} @@ -24439,8 +25910,8 @@ def cuDeviceGetLuid(dev): with nogil: err = cydriver.cuDeviceGetLuid(luid, &deviceNodeMask, cydev) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None) - return (_dict_CUresult[err], luid, deviceNodeMask) + return (CUresult(err), None, None) + return (CUresult(err), luid, deviceNodeMask) {{endif}} {{if 'cuDeviceTotalMem_v2' in found_functions}} @@ -24480,8 +25951,8 @@ def cuDeviceTotalMem(dev): with nogil: err = cydriver.cuDeviceTotalMem(&numbytes, cydev) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], numbytes) + return (CUresult(err), None) + return (CUresult(err), numbytes) {{endif}} {{if 'cuDeviceGetTexture1DLinearMaxWidth' in found_functions}} @@ -24528,8 +25999,8 @@ def cuDeviceGetTexture1DLinearMaxWidth(pformat not None : CUarray_format, unsign with nogil: err = cydriver.cuDeviceGetTexture1DLinearMaxWidth(&maxWidthInElements, cypformat, numChannels, cydev) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], maxWidthInElements) + return (CUresult(err), None) + return (CUresult(err), maxWidthInElements) {{endif}} {{if 'cuDeviceGetAttribute' in found_functions}} @@ -24572,8 +26043,8 @@ def cuDeviceGetAttribute(attrib not None : CUdevice_attribute, dev): with nogil: err = cydriver.cuDeviceGetAttribute(&pi, cyattrib, cydev) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pi) + return (CUresult(err), None) + return (CUresult(err), pi) {{endif}} {{if 'cuDeviceGetHostAtomicCapabilities' in found_functions}} @@ -24643,8 +26114,8 @@ def cuDeviceGetHostAtomicCapabilities(operations : Optional[tuple[CUatomicOperat if cycapabilities is not NULL: free(cycapabilities) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pycapabilities) + return (CUresult(err), None) + return (CUresult(err), pycapabilities) {{endif}} {{if 'cuDeviceGetNvSciSyncAttributes' in found_functions}} @@ -24742,7 +26213,7 @@ def cuDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, dev, int flags): cdef void* cynvSciSyncAttrList_ptr = cynvSciSyncAttrList.cptr with nogil: err = cydriver.cuDeviceGetNvSciSyncAttributes(cynvSciSyncAttrList_ptr, cydev, flags) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuDeviceSetMemPool' in found_functions}} @@ -24794,7 +26265,7 @@ def cuDeviceSetMemPool(dev, pool): cydev = pdev with nogil: err = cydriver.cuDeviceSetMemPool(cydev, cypool) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuDeviceGetMemPool' in found_functions}} @@ -24837,8 +26308,8 @@ def cuDeviceGetMemPool(dev): with nogil: err = cydriver.cuDeviceGetMemPool(pool._pvt_ptr, cydev) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pool) + return (CUresult(err), None) + return (CUresult(err), pool) {{endif}} {{if 'cuDeviceGetDefaultMemPool' in found_functions}} @@ -24878,8 +26349,8 @@ def cuDeviceGetDefaultMemPool(dev): with nogil: err = cydriver.cuDeviceGetDefaultMemPool(pool_out._pvt_ptr, cydev) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pool_out) + return (CUresult(err), None) + return (CUresult(err), pool_out) {{endif}} {{if 'cuDeviceGetExecAffinitySupport' in found_functions}} @@ -24926,8 +26397,8 @@ def cuDeviceGetExecAffinitySupport(typename not None : CUexecAffinityType, dev): with nogil: err = cydriver.cuDeviceGetExecAffinitySupport(&pi, cytypename, cydev) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pi) + return (CUresult(err), None) + return (CUresult(err), pi) {{endif}} {{if 'cuFlushGPUDirectRDMAWrites' in found_functions}} @@ -24978,7 +26449,7 @@ def cuFlushGPUDirectRDMAWrites(target not None : CUflushGPUDirectRDMAWritesTarge cdef cydriver.CUflushGPUDirectRDMAWritesScope cyscope = int(scope) with nogil: err = cydriver.cuFlushGPUDirectRDMAWrites(cytarget, cyscope) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuDeviceGetProperties' in found_functions}} @@ -25057,8 +26528,8 @@ def cuDeviceGetProperties(dev): with nogil: err = cydriver.cuDeviceGetProperties(prop._pvt_ptr, cydev) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], prop) + return (CUresult(err), None) + return (CUresult(err), prop) {{endif}} {{if 'cuDeviceComputeCapability' in found_functions}} @@ -25106,8 +26577,8 @@ def cuDeviceComputeCapability(dev): with nogil: err = cydriver.cuDeviceComputeCapability(&major, &minor, cydev) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None) - return (_dict_CUresult[err], major, minor) + return (CUresult(err), None, None) + return (CUresult(err), major, minor) {{endif}} {{if 'cuDevicePrimaryCtxRetain' in found_functions}} @@ -25164,8 +26635,8 @@ def cuDevicePrimaryCtxRetain(dev): with nogil: err = cydriver.cuDevicePrimaryCtxRetain(pctx._pvt_ptr, cydev) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pctx) + return (CUresult(err), None) + return (CUresult(err), pctx) {{endif}} {{if 'cuDevicePrimaryCtxRelease_v2' in found_functions}} @@ -25211,7 +26682,7 @@ def cuDevicePrimaryCtxRelease(dev): cydev = pdev with nogil: err = cydriver.cuDevicePrimaryCtxRelease(cydev) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuDevicePrimaryCtxSetFlags_v2' in found_functions}} @@ -25325,7 +26796,7 @@ def cuDevicePrimaryCtxSetFlags(dev, unsigned int flags): cydev = pdev with nogil: err = cydriver.cuDevicePrimaryCtxSetFlags(cydev, flags) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuDevicePrimaryCtxGetState' in found_functions}} @@ -25369,8 +26840,8 @@ def cuDevicePrimaryCtxGetState(dev): with nogil: err = cydriver.cuDevicePrimaryCtxGetState(cydev, &flags, &active) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None) - return (_dict_CUresult[err], flags, active) + return (CUresult(err), None, None) + return (CUresult(err), flags, active) {{endif}} {{if 'cuDevicePrimaryCtxReset_v2' in found_functions}} @@ -25415,7 +26886,7 @@ def cuDevicePrimaryCtxReset(dev): cydev = pdev with nogil: err = cydriver.cuDevicePrimaryCtxReset(cydev) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuCtxCreate_v4' in found_functions}} @@ -25597,8 +27068,8 @@ def cuCtxCreate(ctxCreateParams : Optional[CUctxCreateParams], unsigned int flag with nogil: err = cydriver.cuCtxCreate(pctx._pvt_ptr, cyctxCreateParams_ptr, flags, cydev) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pctx) + return (CUresult(err), None) + return (CUresult(err), pctx) {{endif}} {{if 'cuCtxDestroy_v2' in found_functions}} @@ -25661,7 +27132,7 @@ def cuCtxDestroy(ctx): cyctx = pctx with nogil: err = cydriver.cuCtxDestroy(cyctx) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuCtxPushCurrent_v2' in found_functions}} @@ -25702,7 +27173,7 @@ def cuCtxPushCurrent(ctx): cyctx = pctx with nogil: err = cydriver.cuCtxPushCurrent(cyctx) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuCtxPopCurrent_v2' in found_functions}} @@ -25734,8 +27205,8 @@ def cuCtxPopCurrent(): with nogil: err = cydriver.cuCtxPopCurrent(pctx._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pctx) + return (CUresult(err), None) + return (CUresult(err), pctx) {{endif}} {{if 'cuCtxSetCurrent' in found_functions}} @@ -25778,7 +27249,7 @@ def cuCtxSetCurrent(ctx): cyctx = pctx with nogil: err = cydriver.cuCtxSetCurrent(cyctx) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuCtxGetCurrent' in found_functions}} @@ -25806,8 +27277,8 @@ def cuCtxGetCurrent(): with nogil: err = cydriver.cuCtxGetCurrent(pctx._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pctx) + return (CUresult(err), None) + return (CUresult(err), pctx) {{endif}} {{if 'cuCtxGetDevice' in found_functions}} @@ -25833,8 +27304,8 @@ def cuCtxGetDevice(): with nogil: err = cydriver.cuCtxGetDevice(device._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], device) + return (CUresult(err), None) + return (CUresult(err), device) {{endif}} {{if 'cuCtxGetDevice_v2' in found_functions}} @@ -25875,8 +27346,8 @@ def cuCtxGetDevice_v2(ctx): with nogil: err = cydriver.cuCtxGetDevice_v2(device._pvt_ptr, cyctx) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], device) + return (CUresult(err), None) + return (CUresult(err), device) {{endif}} {{if 'cuCtxGetFlags' in found_functions}} @@ -25903,8 +27374,8 @@ def cuCtxGetFlags(): with nogil: err = cydriver.cuCtxGetFlags(&flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], flags) + return (CUresult(err), None) + return (CUresult(err), flags) {{endif}} {{if 'cuCtxSetFlags' in found_functions}} @@ -25932,7 +27403,7 @@ def cuCtxSetFlags(unsigned int flags): """ with nogil: err = cydriver.cuCtxSetFlags(flags) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuCtxGetId' in found_functions}} @@ -25974,8 +27445,8 @@ def cuCtxGetId(ctx): with nogil: err = cydriver.cuCtxGetId(cyctx, &ctxId) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], ctxId) + return (CUresult(err), None) + return (CUresult(err), ctxId) {{endif}} {{if 'cuCtxSynchronize' in found_functions}} @@ -26003,7 +27474,7 @@ def cuCtxSynchronize(): """ with nogil: err = cydriver.cuCtxSynchronize() - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuCtxSynchronize_v2' in found_functions}} @@ -26048,7 +27519,7 @@ def cuCtxSynchronize_v2(ctx): cyctx = pctx with nogil: err = cydriver.cuCtxSynchronize_v2(cyctx) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuCtxSetLimit' in found_functions}} @@ -26155,7 +27626,7 @@ def cuCtxSetLimit(limit not None : CUlimit, size_t value): cdef cydriver.CUlimit cylimit = int(limit) with nogil: err = cydriver.cuCtxSetLimit(cylimit, value) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuCtxGetLimit' in found_functions}} @@ -26213,8 +27684,8 @@ def cuCtxGetLimit(limit not None : CUlimit): with nogil: err = cydriver.cuCtxGetLimit(&pvalue, cylimit) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pvalue) + return (CUresult(err), None) + return (CUresult(err), pvalue) {{endif}} {{if 'cuCtxGetCacheConfig' in found_functions}} @@ -26261,8 +27732,8 @@ def cuCtxGetCacheConfig(): with nogil: err = cydriver.cuCtxGetCacheConfig(&pconfig) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], CUfunc_cache(pconfig)) + return (CUresult(err), None) + return (CUresult(err), CUfunc_cache(pconfig)) {{endif}} {{if 'cuCtxSetCacheConfig' in found_functions}} @@ -26320,7 +27791,7 @@ def cuCtxSetCacheConfig(config not None : CUfunc_cache): cdef cydriver.CUfunc_cache cyconfig = int(config) with nogil: err = cydriver.cuCtxSetCacheConfig(cyconfig) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuCtxGetApiVersion' in found_functions}} @@ -26367,8 +27838,8 @@ def cuCtxGetApiVersion(ctx): with nogil: err = cydriver.cuCtxGetApiVersion(cyctx, &version) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], version) + return (CUresult(err), None) + return (CUresult(err), version) {{endif}} {{if 'cuCtxGetStreamPriorityRange' in found_functions}} @@ -26413,8 +27884,8 @@ def cuCtxGetStreamPriorityRange(): with nogil: err = cydriver.cuCtxGetStreamPriorityRange(&leastPriority, &greatestPriority) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None) - return (_dict_CUresult[err], leastPriority, greatestPriority) + return (CUresult(err), None, None) + return (CUresult(err), leastPriority, greatestPriority) {{endif}} {{if 'cuCtxResetPersistingL2Cache' in found_functions}} @@ -26437,7 +27908,7 @@ def cuCtxResetPersistingL2Cache(): """ with nogil: err = cydriver.cuCtxResetPersistingL2Cache() - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuCtxGetExecAffinity' in found_functions}} @@ -26473,8 +27944,8 @@ def cuCtxGetExecAffinity(typename not None : CUexecAffinityType): with nogil: err = cydriver.cuCtxGetExecAffinity(pExecAffinity._pvt_ptr, cytypename) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pExecAffinity) + return (CUresult(err), None) + return (CUresult(err), pExecAffinity) {{endif}} {{if 'cuCtxRecordEvent' in found_functions}} @@ -26534,7 +28005,7 @@ def cuCtxRecordEvent(hCtx, hEvent): cyhCtx = phCtx with nogil: err = cydriver.cuCtxRecordEvent(cyhCtx, cyhEvent) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuCtxWaitEvent' in found_functions}} @@ -26593,7 +28064,7 @@ def cuCtxWaitEvent(hCtx, hEvent): cyhCtx = phCtx with nogil: err = cydriver.cuCtxWaitEvent(cyhCtx, cyhEvent) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuCtxAttach' in found_functions}} @@ -26633,8 +28104,8 @@ def cuCtxAttach(unsigned int flags): with nogil: err = cydriver.cuCtxAttach(pctx._pvt_ptr, flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pctx) + return (CUresult(err), None) + return (CUresult(err), pctx) {{endif}} {{if 'cuCtxDetach' in found_functions}} @@ -26676,7 +28147,7 @@ def cuCtxDetach(ctx): cyctx = pctx with nogil: err = cydriver.cuCtxDetach(cyctx) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuCtxGetSharedMemConfig' in found_functions}} @@ -26718,8 +28189,8 @@ def cuCtxGetSharedMemConfig(): with nogil: err = cydriver.cuCtxGetSharedMemConfig(&pConfig) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], CUsharedconfig(pConfig)) + return (CUresult(err), None) + return (CUresult(err), CUsharedconfig(pConfig)) {{endif}} {{if 'cuCtxSetSharedMemConfig' in found_functions}} @@ -26774,7 +28245,7 @@ def cuCtxSetSharedMemConfig(config not None : CUsharedconfig): cdef cydriver.CUsharedconfig cyconfig = int(config) with nogil: err = cydriver.cuCtxSetSharedMemConfig(cyconfig) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuModuleLoad' in found_functions}} @@ -26812,8 +28283,8 @@ def cuModuleLoad(char* fname): with nogil: err = cydriver.cuModuleLoad(module._pvt_ptr, fname) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], module) + return (CUresult(err), None) + return (CUresult(err), module) {{endif}} {{if 'cuModuleLoadData' in found_functions}} @@ -26849,8 +28320,8 @@ def cuModuleLoadData(image): with nogil: err = cydriver.cuModuleLoadData(module._pvt_ptr, cyimage_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], module) + return (CUresult(err), None) + return (CUresult(err), module) {{endif}} {{if 'cuModuleLoadDataEx' in found_functions}} @@ -26902,8 +28373,8 @@ def cuModuleLoadDataEx(image, unsigned int numOptions, options : Optional[tuple[ with nogil: err = cydriver.cuModuleLoadDataEx(module._pvt_ptr, cyimage_ptr, numOptions, cyoptions.data(), cyoptionValues_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], module) + return (CUresult(err), None) + return (CUresult(err), module) {{endif}} {{if 'cuModuleLoadFatBinary' in found_functions}} @@ -26945,8 +28416,8 @@ def cuModuleLoadFatBinary(fatCubin): with nogil: err = cydriver.cuModuleLoadFatBinary(module._pvt_ptr, cyfatCubin_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], module) + return (CUresult(err), None) + return (CUresult(err), module) {{endif}} {{if 'cuModuleUnload' in found_functions}} @@ -26984,7 +28455,7 @@ def cuModuleUnload(hmod): cyhmod = phmod with nogil: err = cydriver.cuModuleUnload(cyhmod) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuModuleGetLoadingMode' in found_functions}} @@ -27011,8 +28482,8 @@ def cuModuleGetLoadingMode(): with nogil: err = cydriver.cuModuleGetLoadingMode(&mode) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], CUmoduleLoadingMode(mode)) + return (CUresult(err), None) + return (CUresult(err), CUmoduleLoadingMode(mode)) {{endif}} {{if 'cuModuleGetFunction' in found_functions}} @@ -27056,8 +28527,8 @@ def cuModuleGetFunction(hmod, char* name): with nogil: err = cydriver.cuModuleGetFunction(hfunc._pvt_ptr, cyhmod, name) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], hfunc) + return (CUresult(err), None) + return (CUresult(err), hfunc) {{endif}} {{if 'cuModuleGetFunctionCount' in found_functions}} @@ -27092,8 +28563,8 @@ def cuModuleGetFunctionCount(mod): with nogil: err = cydriver.cuModuleGetFunctionCount(&count, cymod) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], count) + return (CUresult(err), None) + return (CUresult(err), count) {{endif}} {{if 'cuModuleEnumerateFunctions' in found_functions}} @@ -27151,8 +28622,8 @@ def cuModuleEnumerateFunctions(unsigned int numFunctions, mod): if cyfunctions is not NULL: free(cyfunctions) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pyfunctions) + return (CUresult(err), None) + return (CUresult(err), pyfunctions) {{endif}} {{if 'cuModuleGetGlobal_v2' in found_functions}} @@ -27200,8 +28671,8 @@ def cuModuleGetGlobal(hmod, char* name): with nogil: err = cydriver.cuModuleGetGlobal(dptr._pvt_ptr, &numbytes, cyhmod, name) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None) - return (_dict_CUresult[err], dptr, numbytes) + return (CUresult(err), None, None) + return (CUresult(err), dptr, numbytes) {{endif}} {{if 'cuLinkCreate_v2' in found_functions}} @@ -27274,8 +28745,8 @@ def cuLinkCreate(unsigned int numOptions, options : Optional[tuple[CUjit_option] for option in pylist: stateOut._keepalive.append(option) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], stateOut) + return (CUresult(err), None) + return (CUresult(err), stateOut) {{endif}} {{if 'cuLinkAddData_v2' in found_functions}} @@ -27349,7 +28820,7 @@ def cuLinkAddData(state, typename not None : CUjitInputType, data, size_t size, cdef void** cyoptionValues_ptr = voidStarHelperoptionValues.cptr with nogil: err = cydriver.cuLinkAddData(cystate, cytypename, cydata_ptr, size, name, numOptions, cyoptions.data(), cyoptionValues_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuLinkAddFile_v2' in found_functions}} @@ -27419,7 +28890,7 @@ def cuLinkAddFile(state, typename not None : CUjitInputType, char* path, unsigne cdef void** cyoptionValues_ptr = voidStarHelperoptionValues.cptr with nogil: err = cydriver.cuLinkAddFile(cystate, cytypename, path, numOptions, cyoptions.data(), cyoptionValues_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuLinkComplete' in found_functions}} @@ -27465,8 +28936,8 @@ def cuLinkComplete(state): with nogil: err = cydriver.cuLinkComplete(cystate, &cubinOut, &sizeOut) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None) - return (_dict_CUresult[err], cubinOut, sizeOut) + return (CUresult(err), None, None) + return (CUresult(err), cubinOut, sizeOut) {{endif}} {{if 'cuLinkDestroy' in found_functions}} @@ -27499,7 +28970,7 @@ def cuLinkDestroy(state): cystate = pstate with nogil: err = cydriver.cuLinkDestroy(cystate) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuModuleGetTexRef' in found_functions}} @@ -27547,8 +29018,8 @@ def cuModuleGetTexRef(hmod, char* name): with nogil: err = cydriver.cuModuleGetTexRef(pTexRef._pvt_ptr, cyhmod, name) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pTexRef) + return (CUresult(err), None) + return (CUresult(err), pTexRef) {{endif}} {{if 'cuModuleGetSurfRef' in found_functions}} @@ -27594,8 +29065,8 @@ def cuModuleGetSurfRef(hmod, char* name): with nogil: err = cydriver.cuModuleGetSurfRef(pSurfRef._pvt_ptr, cyhmod, name) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pSurfRef) + return (CUresult(err), None) + return (CUresult(err), pSurfRef) {{endif}} {{if 'cuLibraryLoadData' in found_functions}} @@ -27693,8 +29164,8 @@ def cuLibraryLoadData(code, jitOptions : Optional[tuple[CUjit_option] | list[CUj with nogil: err = cydriver.cuLibraryLoadData(library._pvt_ptr, cycode_ptr, cyjitOptions.data(), cyjitOptionsValues_ptr, numJitOptions, cylibraryOptions.data(), cylibraryOptionValues_ptr, numLibraryOptions) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], library) + return (CUresult(err), None) + return (CUresult(err), library) {{endif}} {{if 'cuLibraryLoadFromFile' in found_functions}} @@ -27790,8 +29261,8 @@ def cuLibraryLoadFromFile(char* fileName, jitOptions : Optional[tuple[CUjit_opti with nogil: err = cydriver.cuLibraryLoadFromFile(library._pvt_ptr, fileName, cyjitOptions.data(), cyjitOptionsValues_ptr, numJitOptions, cylibraryOptions.data(), cylibraryOptionValues_ptr, numLibraryOptions) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], library) + return (CUresult(err), None) + return (CUresult(err), library) {{endif}} {{if 'cuLibraryUnload' in found_functions}} @@ -27826,7 +29297,7 @@ def cuLibraryUnload(library): cylibrary = plibrary with nogil: err = cydriver.cuLibraryUnload(cylibrary) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuLibraryGetKernel' in found_functions}} @@ -27869,8 +29340,8 @@ def cuLibraryGetKernel(library, char* name): with nogil: err = cydriver.cuLibraryGetKernel(pKernel._pvt_ptr, cylibrary, name) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pKernel) + return (CUresult(err), None) + return (CUresult(err), pKernel) {{endif}} {{if 'cuLibraryGetKernelCount' in found_functions}} @@ -27905,8 +29376,8 @@ def cuLibraryGetKernelCount(lib): with nogil: err = cydriver.cuLibraryGetKernelCount(&count, cylib) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], count) + return (CUresult(err), None) + return (CUresult(err), count) {{endif}} {{if 'cuLibraryEnumerateKernels' in found_functions}} @@ -27958,8 +29429,8 @@ def cuLibraryEnumerateKernels(unsigned int numKernels, lib): if cykernels is not NULL: free(cykernels) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pykernels) + return (CUresult(err), None) + return (CUresult(err), pykernels) {{endif}} {{if 'cuLibraryGetModule' in found_functions}} @@ -28000,8 +29471,8 @@ def cuLibraryGetModule(library): with nogil: err = cydriver.cuLibraryGetModule(pMod._pvt_ptr, cylibrary) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pMod) + return (CUresult(err), None) + return (CUresult(err), pMod) {{endif}} {{if 'cuKernelGetFunction' in found_functions}} @@ -28042,8 +29513,8 @@ def cuKernelGetFunction(kernel): with nogil: err = cydriver.cuKernelGetFunction(pFunc._pvt_ptr, cykernel) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pFunc) + return (CUresult(err), None) + return (CUresult(err), pFunc) {{endif}} {{if 'cuKernelGetLibrary' in found_functions}} @@ -28083,8 +29554,8 @@ def cuKernelGetLibrary(kernel): with nogil: err = cydriver.cuKernelGetLibrary(pLib._pvt_ptr, cykernel) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pLib) + return (CUresult(err), None) + return (CUresult(err), pLib) {{endif}} {{if 'cuLibraryGetGlobal' in found_functions}} @@ -28132,8 +29603,8 @@ def cuLibraryGetGlobal(library, char* name): with nogil: err = cydriver.cuLibraryGetGlobal(dptr._pvt_ptr, &numbytes, cylibrary, name) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None) - return (_dict_CUresult[err], dptr, numbytes) + return (CUresult(err), None, None) + return (CUresult(err), dptr, numbytes) {{endif}} {{if 'cuLibraryGetManaged' in found_functions}} @@ -28183,8 +29654,8 @@ def cuLibraryGetManaged(library, char* name): with nogil: err = cydriver.cuLibraryGetManaged(dptr._pvt_ptr, &numbytes, cylibrary, name) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None) - return (_dict_CUresult[err], dptr, numbytes) + return (CUresult(err), None, None) + return (CUresult(err), dptr, numbytes) {{endif}} {{if 'cuLibraryGetUnifiedFunction' in found_functions}} @@ -28230,8 +29701,8 @@ def cuLibraryGetUnifiedFunction(library, char* symbol): with nogil: err = cydriver.cuLibraryGetUnifiedFunction(&fptr, cylibrary, symbol) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], fptr) + return (CUresult(err), None) + return (CUresult(err), fptr) {{endif}} {{if 'cuKernelGetAttribute' in found_functions}} @@ -28365,8 +29836,8 @@ def cuKernelGetAttribute(attrib not None : CUfunction_attribute, kernel, dev): with nogil: err = cydriver.cuKernelGetAttribute(&pi, cyattrib, cykernel, cydev) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pi) + return (CUresult(err), None) + return (CUresult(err), pi) {{endif}} {{if 'cuKernelSetAttribute' in found_functions}} @@ -28481,7 +29952,7 @@ def cuKernelSetAttribute(attrib not None : CUfunction_attribute, int val, kernel cdef cydriver.CUfunction_attribute cyattrib = int(attrib) with nogil: err = cydriver.cuKernelSetAttribute(cyattrib, val, cykernel, cydev) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuKernelSetCacheConfig' in found_functions}} @@ -28565,7 +30036,7 @@ def cuKernelSetCacheConfig(kernel, config not None : CUfunc_cache, dev): cdef cydriver.CUfunc_cache cyconfig = int(config) with nogil: err = cydriver.cuKernelSetCacheConfig(cykernel, cyconfig, cydev) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuKernelGetName' in found_functions}} @@ -28606,8 +30077,8 @@ def cuKernelGetName(hfunc): with nogil: err = cydriver.cuKernelGetName(&name, cyhfunc) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], name if name != NULL else None) + return (CUresult(err), None) + return (CUresult(err), name if name != NULL else None) {{endif}} {{if 'cuKernelGetParamInfo' in found_functions}} @@ -28661,8 +30132,8 @@ def cuKernelGetParamInfo(kernel, size_t paramIndex): with nogil: err = cydriver.cuKernelGetParamInfo(cykernel, paramIndex, ¶mOffset, ¶mSize) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None) - return (_dict_CUresult[err], paramOffset, paramSize) + return (CUresult(err), None, None) + return (CUresult(err), paramOffset, paramSize) {{endif}} {{if 'cuMemGetInfo_v2' in found_functions}} @@ -28706,8 +30177,8 @@ def cuMemGetInfo(): with nogil: err = cydriver.cuMemGetInfo(&free, &total) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None) - return (_dict_CUresult[err], free, total) + return (CUresult(err), None, None) + return (CUresult(err), free, total) {{endif}} {{if 'cuMemAlloc_v2' in found_functions}} @@ -28742,8 +30213,8 @@ def cuMemAlloc(size_t bytesize): with nogil: err = cydriver.cuMemAlloc(dptr._pvt_ptr, bytesize) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], dptr) + return (CUresult(err), None) + return (CUresult(err), dptr) {{endif}} {{if 'cuMemAllocPitch_v2' in found_functions}} @@ -28811,8 +30282,8 @@ def cuMemAllocPitch(size_t WidthInBytes, size_t Height, unsigned int ElementSize with nogil: err = cydriver.cuMemAllocPitch(dptr._pvt_ptr, &pPitch, WidthInBytes, Height, ElementSizeBytes) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None) - return (_dict_CUresult[err], dptr, pPitch) + return (CUresult(err), None, None) + return (CUresult(err), dptr, pPitch) {{endif}} {{if 'cuMemFree_v2' in found_functions}} @@ -28860,7 +30331,7 @@ def cuMemFree(dptr): cydptr = pdptr with nogil: err = cydriver.cuMemFree(cydptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemGetAddressRange_v2' in found_functions}} @@ -28905,8 +30376,8 @@ def cuMemGetAddressRange(dptr): with nogil: err = cydriver.cuMemGetAddressRange(pbase._pvt_ptr, &psize, cydptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None) - return (_dict_CUresult[err], pbase, psize) + return (CUresult(err), None, None) + return (CUresult(err), pbase, psize) {{endif}} {{if 'cuMemAllocHost_v2' in found_functions}} @@ -28962,8 +30433,8 @@ def cuMemAllocHost(size_t bytesize): with nogil: err = cydriver.cuMemAllocHost(&pp, bytesize) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pp) + return (CUresult(err), None) + return (CUresult(err), pp) {{endif}} {{if 'cuMemFreeHost' in found_functions}} @@ -28993,7 +30464,7 @@ def cuMemFreeHost(p): cdef void* cyp_ptr = cyp.cptr with nogil: err = cydriver.cuMemFreeHost(cyp_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemHostAlloc' in found_functions}} @@ -29085,8 +30556,8 @@ def cuMemHostAlloc(size_t bytesize, unsigned int Flags): with nogil: err = cydriver.cuMemHostAlloc(&pp, bytesize, Flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pp) + return (CUresult(err), None) + return (CUresult(err), pp) {{endif}} {{if 'cuMemHostGetDevicePointer_v2' in found_functions}} @@ -29148,8 +30619,8 @@ def cuMemHostGetDevicePointer(p, unsigned int Flags): with nogil: err = cydriver.cuMemHostGetDevicePointer(pdptr._pvt_ptr, cyp_ptr, Flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pdptr) + return (CUresult(err), None) + return (CUresult(err), pdptr) {{endif}} {{if 'cuMemHostGetFlags' in found_functions}} @@ -29187,8 +30658,8 @@ def cuMemHostGetFlags(p): with nogil: err = cydriver.cuMemHostGetFlags(&pFlags, cyp_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pFlags) + return (CUresult(err), None) + return (CUresult(err), pFlags) {{endif}} {{if 'cuMemAllocManaged' in found_functions}} @@ -29324,8 +30795,8 @@ def cuMemAllocManaged(size_t bytesize, unsigned int flags): with nogil: err = cydriver.cuMemAllocManaged(dptr._pvt_ptr, bytesize, flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], dptr) + return (CUresult(err), None) + return (CUresult(err), dptr) {{endif}} {{if 'cuDeviceRegisterAsyncNotification' in found_functions}} @@ -29419,8 +30890,8 @@ def cuDeviceRegisterAsyncNotification(device, callbackFunc, userData): else: m_global._allocated[int(callback)] = cbData if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], callback) + return (CUresult(err), None) + return (CUresult(err), callback) {{endif}} {{if 'cuDeviceUnregisterAsyncNotification' in found_functions}} @@ -29470,7 +30941,7 @@ def cuDeviceUnregisterAsyncNotification(device, callback): if err == cydriver.CUDA_SUCCESS: free(m_global._allocated[pcallback]) m_global._allocated.erase(pcallback) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuDeviceGetByPCIBusId' in found_functions}} @@ -29504,8 +30975,8 @@ def cuDeviceGetByPCIBusId(char* pciBusId): with nogil: err = cydriver.cuDeviceGetByPCIBusId(dev._pvt_ptr, pciBusId) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], dev) + return (CUresult(err), None) + return (CUresult(err), dev) {{endif}} {{if 'cuDeviceGetPCIBusId' in found_functions}} @@ -29553,8 +31024,8 @@ def cuDeviceGetPCIBusId(int length, dev): with nogil: err = cydriver.cuDeviceGetPCIBusId(pciBusId, length, cydev) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pypciBusId) + return (CUresult(err), None) + return (CUresult(err), pypciBusId) {{endif}} {{if 'cuIpcGetEventHandle' in found_functions}} @@ -29614,8 +31085,8 @@ def cuIpcGetEventHandle(event): with nogil: err = cydriver.cuIpcGetEventHandle(pHandle._pvt_ptr, cyevent) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pHandle) + return (CUresult(err), None) + return (CUresult(err), pHandle) {{endif}} {{if 'cuIpcOpenEventHandle' in found_functions}} @@ -29661,8 +31132,8 @@ def cuIpcOpenEventHandle(handle not None : CUipcEventHandle): with nogil: err = cydriver.cuIpcOpenEventHandle(phEvent._pvt_ptr, handle._pvt_ptr[0]) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phEvent) + return (CUresult(err), None) + return (CUresult(err), phEvent) {{endif}} {{if 'cuIpcGetMemHandle' in found_functions}} @@ -29717,8 +31188,8 @@ def cuIpcGetMemHandle(dptr): with nogil: err = cydriver.cuIpcGetMemHandle(pHandle._pvt_ptr, cydptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pHandle) + return (CUresult(err), None) + return (CUresult(err), pHandle) {{endif}} {{if 'cuIpcOpenMemHandle_v2' in found_functions}} @@ -29786,8 +31257,8 @@ def cuIpcOpenMemHandle(handle not None : CUipcMemHandle, unsigned int Flags): with nogil: err = cydriver.cuIpcOpenMemHandle(pdptr._pvt_ptr, handle._pvt_ptr[0], Flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pdptr) + return (CUresult(err), None) + return (CUresult(err), pdptr) {{endif}} {{if 'cuIpcCloseMemHandle' in found_functions}} @@ -29836,7 +31307,7 @@ def cuIpcCloseMemHandle(dptr): cydptr = pdptr with nogil: err = cydriver.cuIpcCloseMemHandle(cydptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemHostRegister_v2' in found_functions}} @@ -29941,7 +31412,7 @@ def cuMemHostRegister(p, size_t bytesize, unsigned int Flags): cdef void* cyp_ptr = cyp.cptr with nogil: err = cydriver.cuMemHostRegister(cyp_ptr, bytesize, Flags) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemHostUnregister' in found_functions}} @@ -29974,7 +31445,7 @@ def cuMemHostUnregister(p): cdef void* cyp_ptr = cyp.cptr with nogil: err = cydriver.cuMemHostUnregister(cyp_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemcpy' in found_functions}} @@ -30026,7 +31497,7 @@ def cuMemcpy(dst, src, size_t ByteCount): cydst = pdst with nogil: err = cydriver.cuMemcpy(cydst, cysrc, ByteCount) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemcpyPeer' in found_functions}} @@ -30097,7 +31568,7 @@ def cuMemcpyPeer(dstDevice, dstContext, srcDevice, srcContext, size_t ByteCount) cydstDevice = pdstDevice with nogil: err = cydriver.cuMemcpyPeer(cydstDevice, cydstContext, cysrcDevice, cysrcContext, ByteCount) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemcpyHtoD_v2' in found_functions}} @@ -30140,7 +31611,7 @@ def cuMemcpyHtoD(dstDevice, srcHost, size_t ByteCount): cdef void* cysrcHost_ptr = cysrcHost.cptr with nogil: err = cydriver.cuMemcpyHtoD(cydstDevice, cysrcHost_ptr, ByteCount) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemcpyDtoH_v2' in found_functions}} @@ -30183,7 +31654,7 @@ def cuMemcpyDtoH(dstHost, srcDevice, size_t ByteCount): cdef void* cydstHost_ptr = cydstHost.cptr with nogil: err = cydriver.cuMemcpyDtoH(cydstHost_ptr, cysrcDevice, ByteCount) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemcpyDtoD_v2' in found_functions}} @@ -30232,7 +31703,7 @@ def cuMemcpyDtoD(dstDevice, srcDevice, size_t ByteCount): cydstDevice = pdstDevice with nogil: err = cydriver.cuMemcpyDtoD(cydstDevice, cysrcDevice, ByteCount) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemcpyDtoA_v2' in found_functions}} @@ -30284,7 +31755,7 @@ def cuMemcpyDtoA(dstArray, size_t dstOffset, srcDevice, size_t ByteCount): cydstArray = pdstArray with nogil: err = cydriver.cuMemcpyDtoA(cydstArray, dstOffset, cysrcDevice, ByteCount) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemcpyAtoD_v2' in found_functions}} @@ -30338,7 +31809,7 @@ def cuMemcpyAtoD(dstDevice, srcArray, size_t srcOffset, size_t ByteCount): cydstDevice = pdstDevice with nogil: err = cydriver.cuMemcpyAtoD(cydstDevice, cysrcArray, srcOffset, ByteCount) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemcpyHtoA_v2' in found_functions}} @@ -30384,7 +31855,7 @@ def cuMemcpyHtoA(dstArray, size_t dstOffset, srcHost, size_t ByteCount): cdef void* cysrcHost_ptr = cysrcHost.cptr with nogil: err = cydriver.cuMemcpyHtoA(cydstArray, dstOffset, cysrcHost_ptr, ByteCount) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemcpyAtoH_v2' in found_functions}} @@ -30430,7 +31901,7 @@ def cuMemcpyAtoH(dstHost, srcArray, size_t srcOffset, size_t ByteCount): cdef void* cydstHost_ptr = cydstHost.cptr with nogil: err = cydriver.cuMemcpyAtoH(cydstHost_ptr, cysrcArray, srcOffset, ByteCount) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemcpyAtoA_v2' in found_functions}} @@ -30487,7 +31958,7 @@ def cuMemcpyAtoA(dstArray, size_t dstOffset, srcArray, size_t srcOffset, size_t cydstArray = pdstArray with nogil: err = cydriver.cuMemcpyAtoA(cydstArray, dstOffset, cysrcArray, srcOffset, ByteCount) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemcpy2D_v2' in found_functions}} @@ -30614,7 +32085,7 @@ def cuMemcpy2D(pCopy : Optional[CUDA_MEMCPY2D]): cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL with nogil: err = cydriver.cuMemcpy2D(cypCopy_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemcpy2DUnaligned_v2' in found_functions}} @@ -30741,7 +32212,7 @@ def cuMemcpy2DUnaligned(pCopy : Optional[CUDA_MEMCPY2D]): cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL with nogil: err = cydriver.cuMemcpy2DUnaligned(cypCopy_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemcpy3D_v2' in found_functions}} @@ -30871,7 +32342,7 @@ def cuMemcpy3D(pCopy : Optional[CUDA_MEMCPY3D]): cdef cydriver.CUDA_MEMCPY3D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL with nogil: err = cydriver.cuMemcpy3D(cypCopy_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemcpy3DPeer' in found_functions}} @@ -30901,7 +32372,7 @@ def cuMemcpy3DPeer(pCopy : Optional[CUDA_MEMCPY3D_PEER]): cdef cydriver.CUDA_MEMCPY3D_PEER* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL with nogil: err = cydriver.cuMemcpy3DPeer(cypCopy_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemcpyAsync' in found_functions}} @@ -30963,7 +32434,7 @@ def cuMemcpyAsync(dst, src, size_t ByteCount, hStream): cydst = pdst with nogil: err = cydriver.cuMemcpyAsync(cydst, cysrc, ByteCount, cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemcpyPeerAsync' in found_functions}} @@ -31044,7 +32515,7 @@ def cuMemcpyPeerAsync(dstDevice, dstContext, srcDevice, srcContext, size_t ByteC cydstDevice = pdstDevice with nogil: err = cydriver.cuMemcpyPeerAsync(cydstDevice, cydstContext, cysrcDevice, cysrcContext, ByteCount, cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemcpyHtoDAsync_v2' in found_functions}} @@ -31097,7 +32568,7 @@ def cuMemcpyHtoDAsync(dstDevice, srcHost, size_t ByteCount, hStream): cdef void* cysrcHost_ptr = cysrcHost.cptr with nogil: err = cydriver.cuMemcpyHtoDAsync(cydstDevice, cysrcHost_ptr, ByteCount, cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemcpyDtoHAsync_v2' in found_functions}} @@ -31150,7 +32621,7 @@ def cuMemcpyDtoHAsync(dstHost, srcDevice, size_t ByteCount, hStream): cdef void* cydstHost_ptr = cydstHost.cptr with nogil: err = cydriver.cuMemcpyDtoHAsync(cydstHost_ptr, cysrcDevice, ByteCount, cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemcpyDtoDAsync_v2' in found_functions}} @@ -31209,7 +32680,7 @@ def cuMemcpyDtoDAsync(dstDevice, srcDevice, size_t ByteCount, hStream): cydstDevice = pdstDevice with nogil: err = cydriver.cuMemcpyDtoDAsync(cydstDevice, cysrcDevice, ByteCount, cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemcpyHtoAAsync_v2' in found_functions}} @@ -31265,7 +32736,7 @@ def cuMemcpyHtoAAsync(dstArray, size_t dstOffset, srcHost, size_t ByteCount, hSt cdef void* cysrcHost_ptr = cysrcHost.cptr with nogil: err = cydriver.cuMemcpyHtoAAsync(cydstArray, dstOffset, cysrcHost_ptr, ByteCount, cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemcpyAtoHAsync_v2' in found_functions}} @@ -31321,7 +32792,7 @@ def cuMemcpyAtoHAsync(dstHost, srcArray, size_t srcOffset, size_t ByteCount, hSt cdef void* cydstHost_ptr = cydstHost.cptr with nogil: err = cydriver.cuMemcpyAtoHAsync(cydstHost_ptr, cysrcArray, srcOffset, ByteCount, cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemcpy2DAsync_v2' in found_functions}} @@ -31465,7 +32936,7 @@ def cuMemcpy2DAsync(pCopy : Optional[CUDA_MEMCPY2D], hStream): cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL with nogil: err = cydriver.cuMemcpy2DAsync(cypCopy_ptr, cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemcpy3DAsync_v2' in found_functions}} @@ -31605,7 +33076,7 @@ def cuMemcpy3DAsync(pCopy : Optional[CUDA_MEMCPY3D], hStream): cdef cydriver.CUDA_MEMCPY3D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL with nogil: err = cydriver.cuMemcpy3DAsync(cypCopy_ptr, cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemcpy3DPeerAsync' in found_functions}} @@ -31645,7 +33116,7 @@ def cuMemcpy3DPeerAsync(pCopy : Optional[CUDA_MEMCPY3D_PEER], hStream): cdef cydriver.CUDA_MEMCPY3D_PEER* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL with nogil: err = cydriver.cuMemcpy3DPeerAsync(cypCopy_ptr, cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemcpyBatchAsync_v2' in found_functions}} @@ -31817,7 +33288,7 @@ def cuMemcpyBatchAsync(dsts : Optional[tuple[CUdeviceptr] | list[CUdeviceptr]], free(cysrcs) if len(attrs) > 1 and cyattrs is not NULL: free(cyattrs) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemcpy3DBatchAsync_v2' in found_functions}} @@ -31948,7 +33419,7 @@ def cuMemcpy3DBatchAsync(size_t numOps, opList : Optional[tuple[CUDA_MEMCPY3D_BA err = cydriver.cuMemcpy3DBatchAsync(numOps, cyopList, flags, cyhStream) if len(opList) > 1 and cyopList is not NULL: free(cyopList) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemsetD8_v2' in found_functions}} @@ -31987,7 +33458,7 @@ def cuMemsetD8(dstDevice, unsigned char uc, size_t N): cydstDevice = pdstDevice with nogil: err = cydriver.cuMemsetD8(cydstDevice, uc, N) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemsetD16_v2' in found_functions}} @@ -32027,7 +33498,7 @@ def cuMemsetD16(dstDevice, unsigned short us, size_t N): cydstDevice = pdstDevice with nogil: err = cydriver.cuMemsetD16(cydstDevice, us, N) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemsetD32_v2' in found_functions}} @@ -32067,7 +33538,7 @@ def cuMemsetD32(dstDevice, unsigned int ui, size_t N): cydstDevice = pdstDevice with nogil: err = cydriver.cuMemsetD32(cydstDevice, ui, N) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemsetD2D8_v2' in found_functions}} @@ -32114,7 +33585,7 @@ def cuMemsetD2D8(dstDevice, size_t dstPitch, unsigned char uc, size_t Width, siz cydstDevice = pdstDevice with nogil: err = cydriver.cuMemsetD2D8(cydstDevice, dstPitch, uc, Width, Height) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemsetD2D16_v2' in found_functions}} @@ -32162,7 +33633,7 @@ def cuMemsetD2D16(dstDevice, size_t dstPitch, unsigned short us, size_t Width, s cydstDevice = pdstDevice with nogil: err = cydriver.cuMemsetD2D16(cydstDevice, dstPitch, us, Width, Height) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemsetD2D32_v2' in found_functions}} @@ -32210,7 +33681,7 @@ def cuMemsetD2D32(dstDevice, size_t dstPitch, unsigned int ui, size_t Width, siz cydstDevice = pdstDevice with nogil: err = cydriver.cuMemsetD2D32(cydstDevice, dstPitch, ui, Width, Height) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemsetD8Async' in found_functions}} @@ -32259,7 +33730,7 @@ def cuMemsetD8Async(dstDevice, unsigned char uc, size_t N, hStream): cydstDevice = pdstDevice with nogil: err = cydriver.cuMemsetD8Async(cydstDevice, uc, N, cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemsetD16Async' in found_functions}} @@ -32309,7 +33780,7 @@ def cuMemsetD16Async(dstDevice, unsigned short us, size_t N, hStream): cydstDevice = pdstDevice with nogil: err = cydriver.cuMemsetD16Async(cydstDevice, us, N, cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemsetD32Async' in found_functions}} @@ -32359,7 +33830,7 @@ def cuMemsetD32Async(dstDevice, unsigned int ui, size_t N, hStream): cydstDevice = pdstDevice with nogil: err = cydriver.cuMemsetD32Async(cydstDevice, ui, N, cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemsetD2D8Async' in found_functions}} @@ -32416,7 +33887,7 @@ def cuMemsetD2D8Async(dstDevice, size_t dstPitch, unsigned char uc, size_t Width cydstDevice = pdstDevice with nogil: err = cydriver.cuMemsetD2D8Async(cydstDevice, dstPitch, uc, Width, Height, cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemsetD2D16Async' in found_functions}} @@ -32474,7 +33945,7 @@ def cuMemsetD2D16Async(dstDevice, size_t dstPitch, unsigned short us, size_t Wid cydstDevice = pdstDevice with nogil: err = cydriver.cuMemsetD2D16Async(cydstDevice, dstPitch, us, Width, Height, cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemsetD2D32Async' in found_functions}} @@ -32532,7 +34003,7 @@ def cuMemsetD2D32Async(dstDevice, size_t dstPitch, unsigned int ui, size_t Width cydstDevice = pdstDevice with nogil: err = cydriver.cuMemsetD2D32Async(cydstDevice, dstPitch, ui, Width, Height, cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuArrayCreate_v2' in found_functions}} @@ -32602,8 +34073,8 @@ def cuArrayCreate(pAllocateArray : Optional[CUDA_ARRAY_DESCRIPTOR]): with nogil: err = cydriver.cuArrayCreate(pHandle._pvt_ptr, cypAllocateArray_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pHandle) + return (CUresult(err), None) + return (CUresult(err), pHandle) {{endif}} {{if 'cuArrayGetDescriptor_v2' in found_functions}} @@ -32645,8 +34116,8 @@ def cuArrayGetDescriptor(hArray): with nogil: err = cydriver.cuArrayGetDescriptor(pArrayDescriptor._pvt_ptr, cyhArray) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pArrayDescriptor) + return (CUresult(err), None) + return (CUresult(err), pArrayDescriptor) {{endif}} {{if 'cuArrayGetSparseProperties' in found_functions}} @@ -32701,8 +34172,8 @@ def cuArrayGetSparseProperties(array): with nogil: err = cydriver.cuArrayGetSparseProperties(sparseProperties._pvt_ptr, cyarray) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], sparseProperties) + return (CUresult(err), None) + return (CUresult(err), sparseProperties) {{endif}} {{if 'cuMipmappedArrayGetSparseProperties' in found_functions}} @@ -32759,8 +34230,8 @@ def cuMipmappedArrayGetSparseProperties(mipmap): with nogil: err = cydriver.cuMipmappedArrayGetSparseProperties(sparseProperties._pvt_ptr, cymipmap) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], sparseProperties) + return (CUresult(err), None) + return (CUresult(err), sparseProperties) {{endif}} {{if 'cuArrayGetMemoryRequirements' in found_functions}} @@ -32817,8 +34288,8 @@ def cuArrayGetMemoryRequirements(array, device): with nogil: err = cydriver.cuArrayGetMemoryRequirements(memoryRequirements._pvt_ptr, cyarray, cydevice) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], memoryRequirements) + return (CUresult(err), None) + return (CUresult(err), memoryRequirements) {{endif}} {{if 'cuMipmappedArrayGetMemoryRequirements' in found_functions}} @@ -32876,8 +34347,8 @@ def cuMipmappedArrayGetMemoryRequirements(mipmap, device): with nogil: err = cydriver.cuMipmappedArrayGetMemoryRequirements(memoryRequirements._pvt_ptr, cymipmap, cydevice) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], memoryRequirements) + return (CUresult(err), None) + return (CUresult(err), memoryRequirements) {{endif}} {{if 'cuArrayGetPlane' in found_functions}} @@ -32932,8 +34403,8 @@ def cuArrayGetPlane(hArray, unsigned int planeIdx): with nogil: err = cydriver.cuArrayGetPlane(pPlaneArray._pvt_ptr, cyhArray, planeIdx) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pPlaneArray) + return (CUresult(err), None) + return (CUresult(err), pPlaneArray) {{endif}} {{if 'cuArrayDestroy' in found_functions}} @@ -32968,7 +34439,7 @@ def cuArrayDestroy(hArray): cyhArray = phArray with nogil: err = cydriver.cuArrayDestroy(cyhArray) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuArray3DCreate_v2' in found_functions}} @@ -33102,8 +34573,8 @@ def cuArray3DCreate(pAllocateArray : Optional[CUDA_ARRAY3D_DESCRIPTOR]): with nogil: err = cydriver.cuArray3DCreate(pHandle._pvt_ptr, cypAllocateArray_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pHandle) + return (CUresult(err), None) + return (CUresult(err), pHandle) {{endif}} {{if 'cuArray3DGetDescriptor_v2' in found_functions}} @@ -33149,8 +34620,8 @@ def cuArray3DGetDescriptor(hArray): with nogil: err = cydriver.cuArray3DGetDescriptor(pArrayDescriptor._pvt_ptr, cyhArray) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pArrayDescriptor) + return (CUresult(err), None) + return (CUresult(err), pArrayDescriptor) {{endif}} {{if 'cuMipmappedArrayCreate' in found_functions}} @@ -33272,8 +34743,8 @@ def cuMipmappedArrayCreate(pMipmappedArrayDesc : Optional[CUDA_ARRAY3D_DESCRIPTO with nogil: err = cydriver.cuMipmappedArrayCreate(pHandle._pvt_ptr, cypMipmappedArrayDesc_ptr, numMipmapLevels) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pHandle) + return (CUresult(err), None) + return (CUresult(err), pHandle) {{endif}} {{if 'cuMipmappedArrayGetLevel' in found_functions}} @@ -33318,8 +34789,8 @@ def cuMipmappedArrayGetLevel(hMipmappedArray, unsigned int level): with nogil: err = cydriver.cuMipmappedArrayGetLevel(pLevelArray._pvt_ptr, cyhMipmappedArray, level) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pLevelArray) + return (CUresult(err), None) + return (CUresult(err), pLevelArray) {{endif}} {{if 'cuMipmappedArrayDestroy' in found_functions}} @@ -33354,7 +34825,7 @@ def cuMipmappedArrayDestroy(hMipmappedArray): cyhMipmappedArray = phMipmappedArray with nogil: err = cydriver.cuMipmappedArrayDestroy(cyhMipmappedArray) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemGetHandleForAddressRange' in found_functions}} @@ -33435,8 +34906,8 @@ def cuMemGetHandleForAddressRange(dptr, size_t size, handleType not None : CUmem with nogil: err = cydriver.cuMemGetHandleForAddressRange(cyhandle_ptr, cydptr, size, cyhandleType, flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], handle) + return (CUresult(err), None) + return (CUresult(err), handle) {{endif}} {{if 'cuMemBatchDecompressAsync' in found_functions}} @@ -33520,8 +34991,8 @@ def cuMemBatchDecompressAsync(paramsArray : Optional[CUmemDecompressParams], siz with nogil: err = cydriver.cuMemBatchDecompressAsync(cyparamsArray_ptr, count, flags, &errorIndex, cystream) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], errorIndex) + return (CUresult(err), None) + return (CUresult(err), errorIndex) {{endif}} {{if 'cuMemAddressReserve' in found_functions}} @@ -33573,8 +35044,8 @@ def cuMemAddressReserve(size_t size, size_t alignment, addr, unsigned long long with nogil: err = cydriver.cuMemAddressReserve(ptr._pvt_ptr, size, alignment, cyaddr, flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], ptr) + return (CUresult(err), None) + return (CUresult(err), ptr) {{endif}} {{if 'cuMemAddressFree' in found_functions}} @@ -33613,7 +35084,7 @@ def cuMemAddressFree(ptr, size_t size): cyptr = pptr with nogil: err = cydriver.cuMemAddressFree(cyptr, size) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemCreate' in found_functions}} @@ -33705,8 +35176,8 @@ def cuMemCreate(size_t size, prop : Optional[CUmemAllocationProp], unsigned long with nogil: err = cydriver.cuMemCreate(handle._pvt_ptr, size, cyprop_ptr, flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], handle) + return (CUresult(err), None) + return (CUresult(err), handle) {{endif}} {{if 'cuMemRelease' in found_functions}} @@ -33750,7 +35221,7 @@ def cuMemRelease(handle): cyhandle = phandle with nogil: err = cydriver.cuMemRelease(cyhandle) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemMap' in found_functions}} @@ -33833,7 +35304,7 @@ def cuMemMap(ptr, size_t size, size_t offset, handle, unsigned long long flags): cyptr = pptr with nogil: err = cydriver.cuMemMap(cyptr, size, offset, cyhandle, flags) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemMapArrayAsync' in found_functions}} @@ -34007,7 +35478,7 @@ def cuMemMapArrayAsync(mapInfoList : Optional[tuple[CUarrayMapInfo] | list[CUarr err = cydriver.cuMemMapArrayAsync(cymapInfoList, count, cyhStream) if len(mapInfoList) > 1 and cymapInfoList is not NULL: free(cymapInfoList) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemUnmap' in found_functions}} @@ -34055,7 +35526,7 @@ def cuMemUnmap(ptr, size_t size): cyptr = pptr with nogil: err = cydriver.cuMemUnmap(cyptr, size) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemSetAccess' in found_functions}} @@ -34128,7 +35599,7 @@ def cuMemSetAccess(ptr, size_t size, desc : Optional[tuple[CUmemAccessDesc] | li err = cydriver.cuMemSetAccess(cyptr, size, cydesc, count) if len(desc) > 1 and cydesc is not NULL: free(cydesc) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemGetAccess' in found_functions}} @@ -34168,8 +35639,8 @@ def cuMemGetAccess(location : Optional[CUmemLocation], ptr): with nogil: err = cydriver.cuMemGetAccess(&flags, cylocation_ptr, cyptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], flags) + return (CUresult(err), None) + return (CUresult(err), flags) {{endif}} {{if 'cuMemExportToShareableHandle' in found_functions}} @@ -34228,8 +35699,8 @@ def cuMemExportToShareableHandle(handle, handleType not None : CUmemAllocationHa with nogil: err = cydriver.cuMemExportToShareableHandle(cyshareableHandle_ptr, cyhandle, cyhandleType, flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], cyshareableHandle.pyObj()) + return (CUresult(err), None) + return (CUresult(err), cyshareableHandle.pyObj()) {{endif}} {{if 'cuMemImportFromShareableHandle' in found_functions}} @@ -34278,8 +35749,8 @@ def cuMemImportFromShareableHandle(osHandle, shHandleType not None : CUmemAlloca with nogil: err = cydriver.cuMemImportFromShareableHandle(handle._pvt_ptr, cyosHandle_ptr, cyshHandleType) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], handle) + return (CUresult(err), None) + return (CUresult(err), handle) {{endif}} {{if 'cuMemGetAllocationGranularity' in found_functions}} @@ -34317,8 +35788,8 @@ def cuMemGetAllocationGranularity(prop : Optional[CUmemAllocationProp], option n with nogil: err = cydriver.cuMemGetAllocationGranularity(&granularity, cyprop_ptr, cyoption) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], granularity) + return (CUresult(err), None) + return (CUresult(err), granularity) {{endif}} {{if 'cuMemGetAllocationPropertiesFromHandle' in found_functions}} @@ -34356,8 +35827,8 @@ def cuMemGetAllocationPropertiesFromHandle(handle): with nogil: err = cydriver.cuMemGetAllocationPropertiesFromHandle(prop._pvt_ptr, cyhandle) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], prop) + return (CUresult(err), None) + return (CUresult(err), prop) {{endif}} {{if 'cuMemRetainAllocationHandle' in found_functions}} @@ -34397,8 +35868,8 @@ def cuMemRetainAllocationHandle(addr): with nogil: err = cydriver.cuMemRetainAllocationHandle(handle._pvt_ptr, cyaddr_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], handle) + return (CUresult(err), None) + return (CUresult(err), handle) {{endif}} {{if 'cuMemFreeAsync' in found_functions}} @@ -34446,7 +35917,7 @@ def cuMemFreeAsync(dptr, hStream): cydptr = pdptr with nogil: err = cydriver.cuMemFreeAsync(cydptr, cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemAllocAsync' in found_functions}} @@ -34499,8 +35970,8 @@ def cuMemAllocAsync(size_t bytesize, hStream): with nogil: err = cydriver.cuMemAllocAsync(dptr._pvt_ptr, bytesize, cyhStream) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], dptr) + return (CUresult(err), None) + return (CUresult(err), dptr) {{endif}} {{if 'cuMemPoolTrimTo' in found_functions}} @@ -34550,7 +36021,7 @@ def cuMemPoolTrimTo(pool, size_t minBytesToKeep): cypool = ppool with nogil: err = cydriver.cuMemPoolTrimTo(cypool, minBytesToKeep) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemPoolSetAttribute' in found_functions}} @@ -34625,7 +36096,7 @@ def cuMemPoolSetAttribute(pool, attr not None : CUmemPool_attribute, value): cdef void* cyvalue_ptr = cyvalue.cptr with nogil: err = cydriver.cuMemPoolSetAttribute(cypool, cyattr, cyvalue_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemPoolGetAttribute' in found_functions}} @@ -34708,8 +36179,8 @@ def cuMemPoolGetAttribute(pool, attr not None : CUmemPool_attribute): with nogil: err = cydriver.cuMemPoolGetAttribute(cypool, cyattr, cyvalue_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], cyvalue.pyObj()) + return (CUresult(err), None) + return (CUresult(err), cyvalue.pyObj()) {{endif}} {{if 'cuMemPoolSetAccess' in found_functions}} @@ -34762,7 +36233,7 @@ def cuMemPoolSetAccess(pool, map : Optional[tuple[CUmemAccessDesc] | list[CUmemA err = cydriver.cuMemPoolSetAccess(cypool, cymap, count) if len(map) > 1 and cymap is not NULL: free(cymap) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemPoolGetAccess' in found_functions}} @@ -34805,8 +36276,8 @@ def cuMemPoolGetAccess(memPool, location : Optional[CUmemLocation]): with nogil: err = cydriver.cuMemPoolGetAccess(&flags, cymemPool, cylocation_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], CUmemAccess_flags(flags)) + return (CUresult(err), None) + return (CUresult(err), CUmemAccess_flags(flags)) {{endif}} {{if 'cuMemPoolCreate' in found_functions}} @@ -34904,8 +36375,8 @@ def cuMemPoolCreate(poolProps : Optional[CUmemPoolProps]): with nogil: err = cydriver.cuMemPoolCreate(pool._pvt_ptr, cypoolProps_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pool) + return (CUresult(err), None) + return (CUresult(err), pool) {{endif}} {{if 'cuMemPoolDestroy' in found_functions}} @@ -34951,7 +36422,7 @@ def cuMemPoolDestroy(pool): cypool = ppool with nogil: err = cydriver.cuMemPoolDestroy(cypool) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemGetDefaultMemPool' in found_functions}} @@ -34995,8 +36466,8 @@ def cuMemGetDefaultMemPool(location : Optional[CUmemLocation], typename not None with nogil: err = cydriver.cuMemGetDefaultMemPool(pool_out._pvt_ptr, cylocation_ptr, cytypename) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pool_out) + return (CUresult(err), None) + return (CUresult(err), pool_out) {{endif}} {{if 'cuMemGetMemPool' in found_functions}} @@ -35048,8 +36519,8 @@ def cuMemGetMemPool(location : Optional[CUmemLocation], typename not None : CUme with nogil: err = cydriver.cuMemGetMemPool(pool._pvt_ptr, cylocation_ptr, cytypename) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pool) + return (CUresult(err), None) + return (CUresult(err), pool) {{endif}} {{if 'cuMemSetMemPool' in found_functions}} @@ -35115,7 +36586,7 @@ def cuMemSetMemPool(location : Optional[CUmemLocation], typename not None : CUme cdef cydriver.CUmemAllocationType cytypename = int(typename) with nogil: err = cydriver.cuMemSetMemPool(cylocation_ptr, cytypename, cypool) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemAllocFromPoolAsync' in found_functions}} @@ -35173,8 +36644,8 @@ def cuMemAllocFromPoolAsync(size_t bytesize, pool, hStream): with nogil: err = cydriver.cuMemAllocFromPoolAsync(dptr._pvt_ptr, bytesize, cypool, cyhStream) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], dptr) + return (CUresult(err), None) + return (CUresult(err), dptr) {{endif}} {{if 'cuMemPoolExportToShareableHandle' in found_functions}} @@ -35230,8 +36701,8 @@ def cuMemPoolExportToShareableHandle(pool, handleType not None : CUmemAllocation with nogil: err = cydriver.cuMemPoolExportToShareableHandle(cyhandle_out_ptr, cypool, cyhandleType, flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], cyhandle_out.pyObj()) + return (CUresult(err), None) + return (CUresult(err), cyhandle_out.pyObj()) {{endif}} {{if 'cuMemPoolImportFromShareableHandle' in found_functions}} @@ -35279,8 +36750,8 @@ def cuMemPoolImportFromShareableHandle(handle, handleType not None : CUmemAlloca with nogil: err = cydriver.cuMemPoolImportFromShareableHandle(pool_out._pvt_ptr, cyhandle_ptr, cyhandleType, flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pool_out) + return (CUresult(err), None) + return (CUresult(err), pool_out) {{endif}} {{if 'cuMemPoolExportPointer' in found_functions}} @@ -35322,8 +36793,8 @@ def cuMemPoolExportPointer(ptr): with nogil: err = cydriver.cuMemPoolExportPointer(shareData_out._pvt_ptr, cyptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], shareData_out) + return (CUresult(err), None) + return (CUresult(err), shareData_out) {{endif}} {{if 'cuMemPoolImportPointer' in found_functions}} @@ -35375,8 +36846,8 @@ def cuMemPoolImportPointer(pool, shareData : Optional[CUmemPoolPtrExportData]): with nogil: err = cydriver.cuMemPoolImportPointer(ptr_out._pvt_ptr, cypool, cyshareData_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], ptr_out) + return (CUresult(err), None) + return (CUresult(err), ptr_out) {{endif}} {{if 'cuMulticastCreate' in found_functions}} @@ -35438,8 +36909,8 @@ def cuMulticastCreate(prop : Optional[CUmulticastObjectProp]): with nogil: err = cydriver.cuMulticastCreate(mcHandle._pvt_ptr, cyprop_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], mcHandle) + return (CUresult(err), None) + return (CUresult(err), mcHandle) {{endif}} {{if 'cuMulticastAddDevice' in found_functions}} @@ -35496,7 +36967,7 @@ def cuMulticastAddDevice(mcHandle, dev): cymcHandle = pmcHandle with nogil: err = cydriver.cuMulticastAddDevice(cymcHandle, cydev) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMulticastBindMem' in found_functions}} @@ -35578,7 +37049,7 @@ def cuMulticastBindMem(mcHandle, size_t mcOffset, memHandle, size_t memOffset, s cymcHandle = pmcHandle with nogil: err = cydriver.cuMulticastBindMem(cymcHandle, mcOffset, cymemHandle, memOffset, size, flags) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMulticastBindMem_v2' in found_functions}} @@ -35679,7 +37150,7 @@ def cuMulticastBindMem_v2(mcHandle, dev, size_t mcOffset, memHandle, size_t memO cymcHandle = pmcHandle with nogil: err = cydriver.cuMulticastBindMem_v2(cymcHandle, cydev, mcOffset, cymemHandle, memOffset, size, flags) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMulticastBindAddr' in found_functions}} @@ -35757,7 +37228,7 @@ def cuMulticastBindAddr(mcHandle, size_t mcOffset, memptr, size_t size, unsigned cymcHandle = pmcHandle with nogil: err = cydriver.cuMulticastBindAddr(cymcHandle, mcOffset, cymemptr, size, flags) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMulticastBindAddr_v2' in found_functions}} @@ -35852,7 +37323,7 @@ def cuMulticastBindAddr_v2(mcHandle, dev, size_t mcOffset, memptr, size_t size, cymcHandle = pmcHandle with nogil: err = cydriver.cuMulticastBindAddr_v2(cymcHandle, cydev, mcOffset, cymemptr, size, flags) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMulticastUnbind' in found_functions}} @@ -35913,7 +37384,7 @@ def cuMulticastUnbind(mcHandle, dev, size_t mcOffset, size_t size): cymcHandle = pmcHandle with nogil: err = cydriver.cuMulticastUnbind(cymcHandle, cydev, mcOffset, size) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMulticastGetGranularity' in found_functions}} @@ -35953,8 +37424,8 @@ def cuMulticastGetGranularity(prop : Optional[CUmulticastObjectProp], option not with nogil: err = cydriver.cuMulticastGetGranularity(&granularity, cyprop_ptr, cyoption) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], granularity) + return (CUresult(err), None) + return (CUresult(err), granularity) {{endif}} {{if 'cuPointerGetAttribute' in found_functions}} @@ -36166,8 +37637,8 @@ def cuPointerGetAttribute(attribute not None : CUpointer_attribute, ptr): with nogil: err = cydriver.cuPointerGetAttribute(cydata_ptr, cyattribute, cyptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], cydata.pyObj()) + return (CUresult(err), None) + return (CUresult(err), cydata.pyObj()) {{endif}} {{if 'cuMemPrefetchAsync_v2' in found_functions}} @@ -36290,7 +37761,7 @@ def cuMemPrefetchAsync(devPtr, size_t count, location not None : CUmemLocation, cydevPtr = pdevPtr with nogil: err = cydriver.cuMemPrefetchAsync(cydevPtr, count, location._pvt_ptr[0], flags, cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemAdvise_v2' in found_functions}} @@ -36495,7 +37966,7 @@ def cuMemAdvise(devPtr, size_t count, advice not None : CUmem_advise, location n cdef cydriver.CUmem_advise cyadvice = int(advice) with nogil: err = cydriver.cuMemAdvise(cydevPtr, count, cyadvice, location._pvt_ptr[0]) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemPrefetchBatchAsync' in found_functions}} @@ -36615,7 +38086,7 @@ def cuMemPrefetchBatchAsync(dptrs : Optional[tuple[CUdeviceptr] | list[CUdevicep free(cydptrs) if len(prefetchLocs) > 1 and cyprefetchLocs is not NULL: free(cyprefetchLocs) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemDiscardBatchAsync' in found_functions}} @@ -36700,7 +38171,7 @@ def cuMemDiscardBatchAsync(dptrs : Optional[tuple[CUdeviceptr] | list[CUdevicept err = cydriver.cuMemDiscardBatchAsync(cydptrs, cysizes.data(), count, flags, cyhStream) if len(dptrs) > 1 and cydptrs is not NULL: free(cydptrs) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemDiscardAndPrefetchBatchAsync' in found_functions}} @@ -36828,7 +38299,7 @@ def cuMemDiscardAndPrefetchBatchAsync(dptrs : Optional[tuple[CUdeviceptr] | list free(cydptrs) if len(prefetchLocs) > 1 and cyprefetchLocs is not NULL: free(cyprefetchLocs) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuMemRangeGetAttribute' in found_functions}} @@ -36985,8 +38456,8 @@ def cuMemRangeGetAttribute(size_t dataSize, attribute not None : CUmem_range_att with nogil: err = cydriver.cuMemRangeGetAttribute(cydata_ptr, dataSize, cyattribute, cydevPtr, count) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], cydata.pyObj()) + return (CUresult(err), None) + return (CUresult(err), cydata.pyObj()) {{endif}} {{if 'cuMemRangeGetAttributes' in found_functions}} @@ -37072,8 +38543,8 @@ def cuMemRangeGetAttributes(dataSizes : tuple[int] | list[int], attributes : Opt with nogil: err = cydriver.cuMemRangeGetAttributes(cyvoidStarHelper_ptr, cydataSizes.data(), cyattributes.data(), numAttributes, cydevPtr, count) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], [obj.pyObj() for obj in pylist]) + return (CUresult(err), None) + return (CUresult(err), [obj.pyObj() for obj in pylist]) {{endif}} {{if 'cuPointerSetAttribute' in found_functions}} @@ -37129,7 +38600,7 @@ def cuPointerSetAttribute(value, attribute not None : CUpointer_attribute, ptr): cdef cydriver.CUpointer_attribute cyattribute = int(attribute) with nogil: err = cydriver.cuPointerSetAttribute(cyvalue_ptr, cyattribute, cyptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuPointerGetAttributes' in found_functions}} @@ -37222,8 +38693,8 @@ def cuPointerGetAttributes(unsigned int numAttributes, attributes : Optional[tup with nogil: err = cydriver.cuPointerGetAttributes(numAttributes, cyattributes.data(), cyvoidStarHelper_ptr, cyptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], [obj.pyObj() for obj in pylist]) + return (CUresult(err), None) + return (CUresult(err), [obj.pyObj() for obj in pylist]) {{endif}} {{if 'cuStreamCreate' in found_functions}} @@ -37264,8 +38735,8 @@ def cuStreamCreate(unsigned int Flags): with nogil: err = cydriver.cuStreamCreate(phStream._pvt_ptr, Flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phStream) + return (CUresult(err), None) + return (CUresult(err), phStream) {{endif}} {{if 'cuStreamCreateWithPriority' in found_functions}} @@ -37319,8 +38790,8 @@ def cuStreamCreateWithPriority(unsigned int flags, int priority): with nogil: err = cydriver.cuStreamCreateWithPriority(phStream._pvt_ptr, flags, priority) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phStream) + return (CUresult(err), None) + return (CUresult(err), phStream) {{endif}} {{if 'cuStreamGetPriority' in found_functions}} @@ -37367,8 +38838,8 @@ def cuStreamGetPriority(hStream): with nogil: err = cydriver.cuStreamGetPriority(cyhStream, &priority) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], priority) + return (CUresult(err), None) + return (CUresult(err), priority) {{endif}} {{if 'cuStreamGetDevice' in found_functions}} @@ -37407,8 +38878,8 @@ def cuStreamGetDevice(hStream): with nogil: err = cydriver.cuStreamGetDevice(cyhStream, device._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], device) + return (CUresult(err), None) + return (CUresult(err), device) {{endif}} {{if 'cuStreamGetFlags' in found_functions}} @@ -37452,8 +38923,8 @@ def cuStreamGetFlags(hStream): with nogil: err = cydriver.cuStreamGetFlags(cyhStream, &flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], flags) + return (CUresult(err), None) + return (CUresult(err), flags) {{endif}} {{if 'cuStreamGetId' in found_functions}} @@ -37509,8 +38980,8 @@ def cuStreamGetId(hStream): with nogil: err = cydriver.cuStreamGetId(cyhStream, &streamId) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], streamId) + return (CUresult(err), None) + return (CUresult(err), streamId) {{endif}} {{if 'cuStreamGetCtx' in found_functions}} @@ -37574,8 +39045,8 @@ def cuStreamGetCtx(hStream): with nogil: err = cydriver.cuStreamGetCtx(cyhStream, pctx._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pctx) + return (CUresult(err), None) + return (CUresult(err), pctx) {{endif}} {{if 'cuStreamGetCtx_v2' in found_functions}} @@ -37652,8 +39123,8 @@ def cuStreamGetCtx_v2(hStream): with nogil: err = cydriver.cuStreamGetCtx_v2(cyhStream, pCtx._pvt_ptr, pGreenCtx._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None) - return (_dict_CUresult[err], pCtx, pGreenCtx) + return (CUresult(err), None, None) + return (CUresult(err), pCtx, pGreenCtx) {{endif}} {{if 'cuStreamWaitEvent' in found_functions}} @@ -37712,7 +39183,7 @@ def cuStreamWaitEvent(hStream, hEvent, unsigned int Flags): cyhStream = phStream with nogil: err = cydriver.cuStreamWaitEvent(cyhStream, cyhEvent, Flags) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuStreamAddCallback' in found_functions}} @@ -37829,7 +39300,7 @@ def cuStreamAddCallback(hStream, callback, userData, unsigned int flags): err = cydriver.cuStreamAddCallback(cyhStream, cuStreamCallbackWrapper, cbData, flags) if err != cydriver.CUDA_SUCCESS: free(cbData) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuStreamBeginCapture_v2' in found_functions}} @@ -37885,7 +39356,7 @@ def cuStreamBeginCapture(hStream, mode not None : CUstreamCaptureMode): cdef cydriver.CUstreamCaptureMode cymode = int(mode) with nogil: err = cydriver.cuStreamBeginCapture(cyhStream, cymode) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuStreamBeginCaptureToGraph' in found_functions}} @@ -37991,7 +39462,7 @@ def cuStreamBeginCaptureToGraph(hStream, hGraph, dependencies : Optional[tuple[C free(cydependencies) if len(dependencyData) > 1 and cydependencyData is not NULL: free(cydependencyData) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuThreadExchangeStreamCaptureMode' in found_functions}} @@ -38064,8 +39535,8 @@ def cuThreadExchangeStreamCaptureMode(mode not None : CUstreamCaptureMode): with nogil: err = cydriver.cuThreadExchangeStreamCaptureMode(&cymode) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], CUstreamCaptureMode(cymode)) + return (CUresult(err), None) + return (CUresult(err), CUstreamCaptureMode(cymode)) {{endif}} {{if 'cuStreamEndCapture' in found_functions}} @@ -38112,8 +39583,8 @@ def cuStreamEndCapture(hStream): with nogil: err = cydriver.cuStreamEndCapture(cyhStream, phGraph._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phGraph) + return (CUresult(err), None) + return (CUresult(err), phGraph) {{endif}} {{if 'cuStreamIsCapturing' in found_functions}} @@ -38175,8 +39646,8 @@ def cuStreamIsCapturing(hStream): with nogil: err = cydriver.cuStreamIsCapturing(cyhStream, &captureStatus) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], CUstreamCaptureStatus(captureStatus)) + return (CUresult(err), None) + return (CUresult(err), CUstreamCaptureStatus(captureStatus)) {{endif}} {{if 'cuStreamGetCaptureInfo_v3' in found_functions}} @@ -38275,8 +39746,8 @@ def cuStreamGetCaptureInfo(hStream): if CUresult(err) == CUresult(0): pyedgeData_out = [CUgraphEdgeData(_ptr=&cyedgeData_out[idx]) for idx in range(numDependencies_out)] if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None, None, None, None, None) - return (_dict_CUresult[err], CUstreamCaptureStatus(captureStatus_out), id_out, graph_out, pydependencies_out, pyedgeData_out, numDependencies_out) + return (CUresult(err), None, None, None, None, None, None) + return (CUresult(err), CUstreamCaptureStatus(captureStatus_out), id_out, graph_out, pydependencies_out, pyedgeData_out, numDependencies_out) {{endif}} {{if 'cuStreamUpdateCaptureDependencies_v2' in found_functions}} @@ -38363,7 +39834,7 @@ def cuStreamUpdateCaptureDependencies(hStream, dependencies : Optional[tuple[CUg free(cydependencies) if len(dependencyData) > 1 and cydependencyData is not NULL: free(cydependencyData) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuStreamAttachMemAsync' in found_functions}} @@ -38476,7 +39947,7 @@ def cuStreamAttachMemAsync(hStream, dptr, size_t length, unsigned int flags): cyhStream = phStream with nogil: err = cydriver.cuStreamAttachMemAsync(cyhStream, cydptr, length, flags) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuStreamQuery' in found_functions}} @@ -38517,7 +39988,7 @@ def cuStreamQuery(hStream): cyhStream = phStream with nogil: err = cydriver.cuStreamQuery(cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuStreamSynchronize' in found_functions}} @@ -38557,7 +40028,7 @@ def cuStreamSynchronize(hStream): cyhStream = phStream with nogil: err = cydriver.cuStreamSynchronize(cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuStreamDestroy_v2' in found_functions}} @@ -38598,7 +40069,7 @@ def cuStreamDestroy(hStream): cyhStream = phStream with nogil: err = cydriver.cuStreamDestroy(cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuStreamCopyAttributes' in found_functions}} @@ -38644,7 +40115,7 @@ def cuStreamCopyAttributes(dst, src): cydst = pdst with nogil: err = cydriver.cuStreamCopyAttributes(cydst, cysrc) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuStreamGetAttribute' in found_functions}} @@ -38687,8 +40158,8 @@ def cuStreamGetAttribute(hStream, attr not None : CUstreamAttrID): with nogil: err = cydriver.cuStreamGetAttribute(cyhStream, cyattr, value_out._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], value_out) + return (CUresult(err), None) + return (CUresult(err), value_out) {{endif}} {{if 'cuStreamSetAttribute' in found_functions}} @@ -38731,7 +40202,7 @@ def cuStreamSetAttribute(hStream, attr not None : CUstreamAttrID, value : Option cdef cydriver.CUstreamAttrValue* cyvalue_ptr = value._pvt_ptr if value is not None else NULL with nogil: err = cydriver.cuStreamSetAttribute(cyhStream, cyattr, cyvalue_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuEventCreate' in found_functions}} @@ -38781,8 +40252,8 @@ def cuEventCreate(unsigned int Flags): with nogil: err = cydriver.cuEventCreate(phEvent._pvt_ptr, Flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phEvent) + return (CUresult(err), None) + return (CUresult(err), phEvent) {{endif}} {{if 'cuEventRecord' in found_functions}} @@ -38842,7 +40313,7 @@ def cuEventRecord(hEvent, hStream): cyhEvent = phEvent with nogil: err = cydriver.cuEventRecord(cyhEvent, cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuEventRecordWithFlags' in found_functions}} @@ -38912,7 +40383,7 @@ def cuEventRecordWithFlags(hEvent, hStream, unsigned int flags): cyhEvent = phEvent with nogil: err = cydriver.cuEventRecordWithFlags(cyhEvent, cyhStream, flags) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuEventQuery' in found_functions}} @@ -38957,7 +40428,7 @@ def cuEventQuery(hEvent): cyhEvent = phEvent with nogil: err = cydriver.cuEventQuery(cyhEvent) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuEventSynchronize' in found_functions}} @@ -39001,7 +40472,7 @@ def cuEventSynchronize(hEvent): cyhEvent = phEvent with nogil: err = cydriver.cuEventSynchronize(cyhEvent) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuEventDestroy_v2' in found_functions}} @@ -39042,7 +40513,7 @@ def cuEventDestroy(hEvent): cyhEvent = phEvent with nogil: err = cydriver.cuEventDestroy(cyhEvent) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuEventElapsedTime_v2' in found_functions}} @@ -39114,8 +40585,8 @@ def cuEventElapsedTime(hStart, hEnd): with nogil: err = cydriver.cuEventElapsedTime(&pMilliseconds, cyhStart, cyhEnd) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pMilliseconds) + return (CUresult(err), None) + return (CUresult(err), pMilliseconds) {{endif}} {{if 'cuImportExternalMemory' in found_functions}} @@ -39280,8 +40751,8 @@ def cuImportExternalMemory(memHandleDesc : Optional[CUDA_EXTERNAL_MEMORY_HANDLE_ with nogil: err = cydriver.cuImportExternalMemory(extMem_out._pvt_ptr, cymemHandleDesc_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], extMem_out) + return (CUresult(err), None) + return (CUresult(err), extMem_out) {{endif}} {{if 'cuExternalMemoryGetMappedBuffer' in found_functions}} @@ -39350,8 +40821,8 @@ def cuExternalMemoryGetMappedBuffer(extMem, bufferDesc : Optional[CUDA_EXTERNAL_ with nogil: err = cydriver.cuExternalMemoryGetMappedBuffer(devPtr._pvt_ptr, cyextMem, cybufferDesc_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], devPtr) + return (CUresult(err), None) + return (CUresult(err), devPtr) {{endif}} {{if 'cuExternalMemoryGetMappedMipmappedArray' in found_functions}} @@ -39426,8 +40897,8 @@ def cuExternalMemoryGetMappedMipmappedArray(extMem, mipmapDesc : Optional[CUDA_E with nogil: err = cydriver.cuExternalMemoryGetMappedMipmappedArray(mipmap._pvt_ptr, cyextMem, cymipmapDesc_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], mipmap) + return (CUresult(err), None) + return (CUresult(err), mipmap) {{endif}} {{if 'cuDestroyExternalMemory' in found_functions}} @@ -39465,7 +40936,7 @@ def cuDestroyExternalMemory(extMem): cyextMem = pextMem with nogil: err = cydriver.cuDestroyExternalMemory(cyextMem) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuImportExternalSemaphore' in found_functions}} @@ -39615,8 +41086,8 @@ def cuImportExternalSemaphore(semHandleDesc : Optional[CUDA_EXTERNAL_SEMAPHORE_H with nogil: err = cydriver.cuImportExternalSemaphore(extSem_out._pvt_ptr, cysemHandleDesc_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], extSem_out) + return (CUresult(err), None) + return (CUresult(err), extSem_out) {{endif}} {{if 'cuSignalExternalSemaphoresAsync' in found_functions}} @@ -39769,7 +41240,7 @@ def cuSignalExternalSemaphoresAsync(extSemArray : Optional[tuple[CUexternalSemap free(cyextSemArray) if len(paramsArray) > 1 and cyparamsArray is not NULL: free(cyparamsArray) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuWaitExternalSemaphoresAsync' in found_functions}} @@ -39899,7 +41370,7 @@ def cuWaitExternalSemaphoresAsync(extSemArray : Optional[tuple[CUexternalSemapho free(cyextSemArray) if len(paramsArray) > 1 and cyparamsArray is not NULL: free(cyparamsArray) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuDestroyExternalSemaphore' in found_functions}} @@ -39936,7 +41407,7 @@ def cuDestroyExternalSemaphore(extSem): cyextSem = pextSem with nogil: err = cydriver.cuDestroyExternalSemaphore(cyextSem) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuStreamWaitValue32_v2' in found_functions}} @@ -40010,7 +41481,7 @@ def cuStreamWaitValue32(stream, addr, value, unsigned int flags): cystream = pstream with nogil: err = cydriver.cuStreamWaitValue32(cystream, cyaddr, cyvalue, flags) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuStreamWaitValue64_v2' in found_functions}} @@ -40082,7 +41553,7 @@ def cuStreamWaitValue64(stream, addr, value, unsigned int flags): cystream = pstream with nogil: err = cydriver.cuStreamWaitValue64(cystream, cyaddr, cyvalue, flags) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuStreamWriteValue32_v2' in found_functions}} @@ -40144,7 +41615,7 @@ def cuStreamWriteValue32(stream, addr, value, unsigned int flags): cystream = pstream with nogil: err = cydriver.cuStreamWriteValue32(cystream, cyaddr, cyvalue, flags) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuStreamWriteValue64_v2' in found_functions}} @@ -40208,7 +41679,7 @@ def cuStreamWriteValue64(stream, addr, value, unsigned int flags): cystream = pstream with nogil: err = cydriver.cuStreamWriteValue64(cystream, cyaddr, cyvalue, flags) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuStreamBatchMemOp_v2' in found_functions}} @@ -40281,7 +41752,7 @@ def cuStreamBatchMemOp(stream, unsigned int count, paramArray : Optional[tuple[C err = cydriver.cuStreamBatchMemOp(cystream, count, cyparamArray, flags) if len(paramArray) > 1 and cyparamArray is not NULL: free(cyparamArray) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuFuncGetAttribute' in found_functions}} @@ -40416,8 +41887,8 @@ def cuFuncGetAttribute(attrib not None : CUfunction_attribute, hfunc): with nogil: err = cydriver.cuFuncGetAttribute(&pi, cyattrib, cyhfunc) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pi) + return (CUresult(err), None) + return (CUresult(err), pi) {{endif}} {{if 'cuFuncSetAttribute' in found_functions}} @@ -40511,7 +41982,7 @@ def cuFuncSetAttribute(hfunc, attrib not None : CUfunction_attribute, int value) cdef cydriver.CUfunction_attribute cyattrib = int(attrib) with nogil: err = cydriver.cuFuncSetAttribute(cyhfunc, cyattrib, value) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuFuncSetCacheConfig' in found_functions}} @@ -40577,7 +42048,7 @@ def cuFuncSetCacheConfig(hfunc, config not None : CUfunc_cache): cdef cydriver.CUfunc_cache cyconfig = int(config) with nogil: err = cydriver.cuFuncSetCacheConfig(cyhfunc, cyconfig) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuFuncGetModule' in found_functions}} @@ -40620,8 +42091,8 @@ def cuFuncGetModule(hfunc): with nogil: err = cydriver.cuFuncGetModule(hmod._pvt_ptr, cyhfunc) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], hmod) + return (CUresult(err), None) + return (CUresult(err), hmod) {{endif}} {{if 'cuFuncGetName' in found_functions}} @@ -40662,8 +42133,8 @@ def cuFuncGetName(hfunc): with nogil: err = cydriver.cuFuncGetName(&name, cyhfunc) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], name if name != NULL else None) + return (CUresult(err), None) + return (CUresult(err), name if name != NULL else None) {{endif}} {{if 'cuFuncGetParamInfo' in found_functions}} @@ -40717,8 +42188,8 @@ def cuFuncGetParamInfo(func, size_t paramIndex): with nogil: err = cydriver.cuFuncGetParamInfo(cyfunc, paramIndex, ¶mOffset, ¶mSize) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None) - return (_dict_CUresult[err], paramOffset, paramSize) + return (CUresult(err), None, None) + return (CUresult(err), paramOffset, paramSize) {{endif}} {{if 'cuFuncIsLoaded' in found_functions}} @@ -40757,8 +42228,8 @@ def cuFuncIsLoaded(function): with nogil: err = cydriver.cuFuncIsLoaded(&state, cyfunction) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], CUfunctionLoadingState(state)) + return (CUresult(err), None) + return (CUresult(err), CUfunctionLoadingState(state)) {{endif}} {{if 'cuFuncLoad' in found_functions}} @@ -40794,7 +42265,7 @@ def cuFuncLoad(function): cyfunction = pfunction with nogil: err = cydriver.cuFuncLoad(cyfunction) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuLaunchKernel' in found_functions}} @@ -40927,7 +42398,7 @@ def cuLaunchKernel(f, unsigned int gridDimX, unsigned int gridDimY, unsigned int cdef void** cykernelParams_ptr = cykernelParams.ckernelParams with nogil: err = cydriver.cuLaunchKernel(cyf, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, cyhStream, cykernelParams_ptr, extra) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuLaunchKernelEx' in found_functions}} @@ -41168,7 +42639,7 @@ def cuLaunchKernelEx(config : Optional[CUlaunchConfig], f, kernelParams, void_pt cdef void** cykernelParams_ptr = cykernelParams.ckernelParams with nogil: err = cydriver.cuLaunchKernelEx(cyconfig_ptr, cyf, cykernelParams_ptr, extra) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuLaunchCooperativeKernel' in found_functions}} @@ -41281,7 +42752,7 @@ def cuLaunchCooperativeKernel(f, unsigned int gridDimX, unsigned int gridDimY, u cdef void** cykernelParams_ptr = cykernelParams.ckernelParams with nogil: err = cydriver.cuLaunchCooperativeKernel(cyf, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, cyhStream, cykernelParams_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuLaunchCooperativeKernelMultiDevice' in found_functions}} @@ -41455,7 +42926,7 @@ def cuLaunchCooperativeKernelMultiDevice(launchParamsList : Optional[tuple[CUDA_ err = cydriver.cuLaunchCooperativeKernelMultiDevice(cylaunchParamsList, numDevices, flags) if len(launchParamsList) > 1 and cylaunchParamsList is not NULL: free(cylaunchParamsList) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuLaunchHostFunc' in found_functions}} @@ -41564,7 +43035,7 @@ def cuLaunchHostFunc(hStream, fn, userData): err = cydriver.cuLaunchHostFunc(cyhStream, cuHostCallbackWrapper, cbData) if err != cydriver.CUDA_SUCCESS: free(cbData) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuFuncSetBlockShape' in found_functions}} @@ -41608,7 +43079,7 @@ def cuFuncSetBlockShape(hfunc, int x, int y, int z): cyhfunc = phfunc with nogil: err = cydriver.cuFuncSetBlockShape(cyhfunc, x, y, z) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuFuncSetSharedSize' in found_functions}} @@ -41649,7 +43120,7 @@ def cuFuncSetSharedSize(hfunc, unsigned int numbytes): cyhfunc = phfunc with nogil: err = cydriver.cuFuncSetSharedSize(cyhfunc, numbytes) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuParamSetSize' in found_functions}} @@ -41689,7 +43160,7 @@ def cuParamSetSize(hfunc, unsigned int numbytes): cyhfunc = phfunc with nogil: err = cydriver.cuParamSetSize(cyhfunc, numbytes) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuParamSeti' in found_functions}} @@ -41732,7 +43203,7 @@ def cuParamSeti(hfunc, int offset, unsigned int value): cyhfunc = phfunc with nogil: err = cydriver.cuParamSeti(cyhfunc, offset, value) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuParamSetf' in found_functions}} @@ -41775,7 +43246,7 @@ def cuParamSetf(hfunc, int offset, float value): cyhfunc = phfunc with nogil: err = cydriver.cuParamSetf(cyhfunc, offset, value) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuParamSetv' in found_functions}} @@ -41822,7 +43293,7 @@ def cuParamSetv(hfunc, int offset, ptr, unsigned int numbytes): cdef void* cyptr_ptr = cyptr.cptr with nogil: err = cydriver.cuParamSetv(cyhfunc, offset, cyptr_ptr, numbytes) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuLaunch' in found_functions}} @@ -41873,7 +43344,7 @@ def cuLaunch(f): cyf = pf with nogil: err = cydriver.cuLaunch(cyf) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuLaunchGrid' in found_functions}} @@ -41928,7 +43399,7 @@ def cuLaunchGrid(f, int grid_width, int grid_height): cyf = pf with nogil: err = cydriver.cuLaunchGrid(cyf, grid_width, grid_height) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuLaunchGridAsync' in found_functions}} @@ -41999,7 +43470,7 @@ def cuLaunchGridAsync(f, int grid_width, int grid_height, hStream): cyf = pf with nogil: err = cydriver.cuLaunchGridAsync(cyf, grid_width, grid_height, cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuParamSetTexRef' in found_functions}} @@ -42048,7 +43519,7 @@ def cuParamSetTexRef(hfunc, int texunit, hTexRef): cyhfunc = phfunc with nogil: err = cydriver.cuParamSetTexRef(cyhfunc, texunit, cyhTexRef) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuFuncSetSharedMemConfig' in found_functions}} @@ -42121,7 +43592,7 @@ def cuFuncSetSharedMemConfig(hfunc, config not None : CUsharedconfig): cdef cydriver.CUsharedconfig cyconfig = int(config) with nogil: err = cydriver.cuFuncSetSharedMemConfig(cyhfunc, cyconfig) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphCreate' in found_functions}} @@ -42152,8 +43623,8 @@ def cuGraphCreate(unsigned int flags): with nogil: err = cydriver.cuGraphCreate(phGraph._pvt_ptr, flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phGraph) + return (CUresult(err), None) + return (CUresult(err), phGraph) {{endif}} {{if 'cuGraphAddKernelNode_v2' in found_functions}} @@ -42276,8 +43747,8 @@ def cuGraphAddKernelNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | li if len(dependencies) > 1 and cydependencies is not NULL: free(cydependencies) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phGraphNode) + return (CUresult(err), None) + return (CUresult(err), phGraphNode) {{endif}} {{if 'cuGraphKernelNodeGetParams_v2' in found_functions}} @@ -42325,8 +43796,8 @@ def cuGraphKernelNodeGetParams(hNode): with nogil: err = cydriver.cuGraphKernelNodeGetParams(cyhNode, nodeParams._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], nodeParams) + return (CUresult(err), None) + return (CUresult(err), nodeParams) {{endif}} {{if 'cuGraphKernelNodeSetParams_v2' in found_functions}} @@ -42364,7 +43835,7 @@ def cuGraphKernelNodeSetParams(hNode, nodeParams : Optional[CUDA_KERNEL_NODE_PAR cdef cydriver.CUDA_KERNEL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphKernelNodeSetParams(cyhNode, cynodeParams_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphAddMemcpyNode' in found_functions}} @@ -42454,8 +43925,8 @@ def cuGraphAddMemcpyNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | li if len(dependencies) > 1 and cydependencies is not NULL: free(cydependencies) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phGraphNode) + return (CUresult(err), None) + return (CUresult(err), phGraphNode) {{endif}} {{if 'cuGraphMemcpyNodeGetParams' in found_functions}} @@ -42494,8 +43965,8 @@ def cuGraphMemcpyNodeGetParams(hNode): with nogil: err = cydriver.cuGraphMemcpyNodeGetParams(cyhNode, nodeParams._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], nodeParams) + return (CUresult(err), None) + return (CUresult(err), nodeParams) {{endif}} {{if 'cuGraphMemcpyNodeSetParams' in found_functions}} @@ -42533,7 +44004,7 @@ def cuGraphMemcpyNodeSetParams(hNode, nodeParams : Optional[CUDA_MEMCPY3D]): cdef cydriver.CUDA_MEMCPY3D* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphMemcpyNodeSetParams(cyhNode, cynodeParams_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphAddMemsetNode' in found_functions}} @@ -42613,8 +44084,8 @@ def cuGraphAddMemsetNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | li if len(dependencies) > 1 and cydependencies is not NULL: free(cydependencies) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phGraphNode) + return (CUresult(err), None) + return (CUresult(err), phGraphNode) {{endif}} {{if 'cuGraphMemsetNodeGetParams' in found_functions}} @@ -42653,8 +44124,8 @@ def cuGraphMemsetNodeGetParams(hNode): with nogil: err = cydriver.cuGraphMemsetNodeGetParams(cyhNode, nodeParams._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], nodeParams) + return (CUresult(err), None) + return (CUresult(err), nodeParams) {{endif}} {{if 'cuGraphMemsetNodeSetParams' in found_functions}} @@ -42692,7 +44163,7 @@ def cuGraphMemsetNodeSetParams(hNode, nodeParams : Optional[CUDA_MEMSET_NODE_PAR cdef cydriver.CUDA_MEMSET_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphMemsetNodeSetParams(cyhNode, cynodeParams_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphAddHostNode' in found_functions}} @@ -42762,8 +44233,8 @@ def cuGraphAddHostNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | list if len(dependencies) > 1 and cydependencies is not NULL: free(cydependencies) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phGraphNode) + return (CUresult(err), None) + return (CUresult(err), phGraphNode) {{endif}} {{if 'cuGraphHostNodeGetParams' in found_functions}} @@ -42802,8 +44273,8 @@ def cuGraphHostNodeGetParams(hNode): with nogil: err = cydriver.cuGraphHostNodeGetParams(cyhNode, nodeParams._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], nodeParams) + return (CUresult(err), None) + return (CUresult(err), nodeParams) {{endif}} {{if 'cuGraphHostNodeSetParams' in found_functions}} @@ -42841,7 +44312,7 @@ def cuGraphHostNodeSetParams(hNode, nodeParams : Optional[CUDA_HOST_NODE_PARAMS] cdef cydriver.CUDA_HOST_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphHostNodeSetParams(cyhNode, cynodeParams_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphAddChildGraphNode' in found_functions}} @@ -42921,8 +44392,8 @@ def cuGraphAddChildGraphNode(hGraph, dependencies : Optional[tuple[CUgraphNode] if len(dependencies) > 1 and cydependencies is not NULL: free(cydependencies) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phGraphNode) + return (CUresult(err), None) + return (CUresult(err), phGraphNode) {{endif}} {{if 'cuGraphChildGraphNodeGetGraph' in found_functions}} @@ -42966,8 +44437,8 @@ def cuGraphChildGraphNodeGetGraph(hNode): with nogil: err = cydriver.cuGraphChildGraphNodeGetGraph(cyhNode, phGraph._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phGraph) + return (CUresult(err), None) + return (CUresult(err), phGraph) {{endif}} {{if 'cuGraphAddEmptyNode' in found_functions}} @@ -43037,8 +44508,8 @@ def cuGraphAddEmptyNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | lis if len(dependencies) > 1 and cydependencies is not NULL: free(cydependencies) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phGraphNode) + return (CUresult(err), None) + return (CUresult(err), phGraphNode) {{endif}} {{if 'cuGraphAddEventRecordNode' in found_functions}} @@ -43115,8 +44586,8 @@ def cuGraphAddEventRecordNode(hGraph, dependencies : Optional[tuple[CUgraphNode] if len(dependencies) > 1 and cydependencies is not NULL: free(cydependencies) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phGraphNode) + return (CUresult(err), None) + return (CUresult(err), phGraphNode) {{endif}} {{if 'cuGraphEventRecordNodeGetEvent' in found_functions}} @@ -43155,8 +44626,8 @@ def cuGraphEventRecordNodeGetEvent(hNode): with nogil: err = cydriver.cuGraphEventRecordNodeGetEvent(cyhNode, event_out._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], event_out) + return (CUresult(err), None) + return (CUresult(err), event_out) {{endif}} {{if 'cuGraphEventRecordNodeSetEvent' in found_functions}} @@ -43201,7 +44672,7 @@ def cuGraphEventRecordNodeSetEvent(hNode, event): cyhNode = phNode with nogil: err = cydriver.cuGraphEventRecordNodeSetEvent(cyhNode, cyevent) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphAddEventWaitNode' in found_functions}} @@ -43280,8 +44751,8 @@ def cuGraphAddEventWaitNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | if len(dependencies) > 1 and cydependencies is not NULL: free(cydependencies) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phGraphNode) + return (CUresult(err), None) + return (CUresult(err), phGraphNode) {{endif}} {{if 'cuGraphEventWaitNodeGetEvent' in found_functions}} @@ -43320,8 +44791,8 @@ def cuGraphEventWaitNodeGetEvent(hNode): with nogil: err = cydriver.cuGraphEventWaitNodeGetEvent(cyhNode, event_out._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], event_out) + return (CUresult(err), None) + return (CUresult(err), event_out) {{endif}} {{if 'cuGraphEventWaitNodeSetEvent' in found_functions}} @@ -43366,7 +44837,7 @@ def cuGraphEventWaitNodeSetEvent(hNode, event): cyhNode = phNode with nogil: err = cydriver.cuGraphEventWaitNodeSetEvent(cyhNode, cyevent) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphAddExternalSemaphoresSignalNode' in found_functions}} @@ -43437,8 +44908,8 @@ def cuGraphAddExternalSemaphoresSignalNode(hGraph, dependencies : Optional[tuple if len(dependencies) > 1 and cydependencies is not NULL: free(cydependencies) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phGraphNode) + return (CUresult(err), None) + return (CUresult(err), phGraphNode) {{endif}} {{if 'cuGraphExternalSemaphoresSignalNodeGetParams' in found_functions}} @@ -43483,8 +44954,8 @@ def cuGraphExternalSemaphoresSignalNodeGetParams(hNode): with nogil: err = cydriver.cuGraphExternalSemaphoresSignalNodeGetParams(cyhNode, params_out._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], params_out) + return (CUresult(err), None) + return (CUresult(err), params_out) {{endif}} {{if 'cuGraphExternalSemaphoresSignalNodeSetParams' in found_functions}} @@ -43523,7 +44994,7 @@ def cuGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams : Optional[CU cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphExternalSemaphoresSignalNodeSetParams(cyhNode, cynodeParams_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphAddExternalSemaphoresWaitNode' in found_functions}} @@ -43594,8 +45065,8 @@ def cuGraphAddExternalSemaphoresWaitNode(hGraph, dependencies : Optional[tuple[C if len(dependencies) > 1 and cydependencies is not NULL: free(cydependencies) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phGraphNode) + return (CUresult(err), None) + return (CUresult(err), phGraphNode) {{endif}} {{if 'cuGraphExternalSemaphoresWaitNodeGetParams' in found_functions}} @@ -43640,8 +45111,8 @@ def cuGraphExternalSemaphoresWaitNodeGetParams(hNode): with nogil: err = cydriver.cuGraphExternalSemaphoresWaitNodeGetParams(cyhNode, params_out._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], params_out) + return (CUresult(err), None) + return (CUresult(err), params_out) {{endif}} {{if 'cuGraphExternalSemaphoresWaitNodeSetParams' in found_functions}} @@ -43680,7 +45151,7 @@ def cuGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams : Optional[CUDA cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphExternalSemaphoresWaitNodeSetParams(cyhNode, cynodeParams_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphAddBatchMemOpNode' in found_functions}} @@ -43754,8 +45225,8 @@ def cuGraphAddBatchMemOpNode(hGraph, dependencies : Optional[tuple[CUgraphNode] if len(dependencies) > 1 and cydependencies is not NULL: free(cydependencies) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phGraphNode) + return (CUresult(err), None) + return (CUresult(err), phGraphNode) {{endif}} {{if 'cuGraphBatchMemOpNodeGetParams' in found_functions}} @@ -43799,8 +45270,8 @@ def cuGraphBatchMemOpNodeGetParams(hNode): with nogil: err = cydriver.cuGraphBatchMemOpNodeGetParams(cyhNode, nodeParams_out._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], nodeParams_out) + return (CUresult(err), None) + return (CUresult(err), nodeParams_out) {{endif}} {{if 'cuGraphBatchMemOpNodeSetParams' in found_functions}} @@ -43841,7 +45312,7 @@ def cuGraphBatchMemOpNodeSetParams(hNode, nodeParams : Optional[CUDA_BATCH_MEM_O cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphBatchMemOpNodeSetParams(cyhNode, cynodeParams_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphExecBatchMemOpNodeSetParams' in found_functions}} @@ -43912,7 +45383,7 @@ def cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams : Optional[ cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphExecBatchMemOpNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphAddMemAllocNode' in found_functions}} @@ -44023,8 +45494,8 @@ def cuGraphAddMemAllocNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | if len(dependencies) > 1 and cydependencies is not NULL: free(cydependencies) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phGraphNode) + return (CUresult(err), None) + return (CUresult(err), phGraphNode) {{endif}} {{if 'cuGraphMemAllocNodeGetParams' in found_functions}} @@ -44066,8 +45537,8 @@ def cuGraphMemAllocNodeGetParams(hNode): with nogil: err = cydriver.cuGraphMemAllocNodeGetParams(cyhNode, params_out._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], params_out) + return (CUresult(err), None) + return (CUresult(err), params_out) {{endif}} {{if 'cuGraphAddMemFreeNode' in found_functions}} @@ -44162,8 +45633,8 @@ def cuGraphAddMemFreeNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | l if len(dependencies) > 1 and cydependencies is not NULL: free(cydependencies) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phGraphNode) + return (CUresult(err), None) + return (CUresult(err), phGraphNode) {{endif}} {{if 'cuGraphMemFreeNodeGetParams' in found_functions}} @@ -44202,8 +45673,8 @@ def cuGraphMemFreeNodeGetParams(hNode): with nogil: err = cydriver.cuGraphMemFreeNodeGetParams(cyhNode, dptr_out._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], dptr_out) + return (CUresult(err), None) + return (CUresult(err), dptr_out) {{endif}} {{if 'cuDeviceGraphMemTrim' in found_functions}} @@ -44240,7 +45711,7 @@ def cuDeviceGraphMemTrim(device): cydevice = pdevice with nogil: err = cydriver.cuDeviceGraphMemTrim(cydevice) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuDeviceGetGraphMemAttribute' in found_functions}} @@ -44298,8 +45769,8 @@ def cuDeviceGetGraphMemAttribute(device, attr not None : CUgraphMem_attribute): with nogil: err = cydriver.cuDeviceGetGraphMemAttribute(cydevice, cyattr, cyvalue_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], cyvalue.pyObj()) + return (CUresult(err), None) + return (CUresult(err), cyvalue.pyObj()) {{endif}} {{if 'cuDeviceSetGraphMemAttribute' in found_functions}} @@ -44349,7 +45820,7 @@ def cuDeviceSetGraphMemAttribute(device, attr not None : CUgraphMem_attribute, v cdef void* cyvalue_ptr = cyvalue.cptr with nogil: err = cydriver.cuDeviceSetGraphMemAttribute(cydevice, cyattr, cyvalue_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphClone' in found_functions}} @@ -44398,8 +45869,8 @@ def cuGraphClone(originalGraph): with nogil: err = cydriver.cuGraphClone(phGraphClone._pvt_ptr, cyoriginalGraph) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phGraphClone) + return (CUresult(err), None) + return (CUresult(err), phGraphClone) {{endif}} {{if 'cuGraphNodeFindInClone' in found_functions}} @@ -44455,8 +45926,8 @@ def cuGraphNodeFindInClone(hOriginalNode, hClonedGraph): with nogil: err = cydriver.cuGraphNodeFindInClone(phNode._pvt_ptr, cyhOriginalNode, cyhClonedGraph) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phNode) + return (CUresult(err), None) + return (CUresult(err), phNode) {{endif}} {{if 'cuGraphNodeGetType' in found_functions}} @@ -44495,8 +45966,8 @@ def cuGraphNodeGetType(hNode): with nogil: err = cydriver.cuGraphNodeGetType(cyhNode, &typename) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], CUgraphNodeType(typename)) + return (CUresult(err), None) + return (CUresult(err), CUgraphNodeType(typename)) {{endif}} {{if 'cuGraphNodeGetContainingGraph' in found_functions}} @@ -44536,8 +46007,8 @@ def cuGraphNodeGetContainingGraph(hNode): with nogil: err = cydriver.cuGraphNodeGetContainingGraph(cyhNode, phGraph._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phGraph) + return (CUresult(err), None) + return (CUresult(err), phGraph) {{endif}} {{if 'cuGraphNodeGetLocalId' in found_functions}} @@ -44578,8 +46049,8 @@ def cuGraphNodeGetLocalId(hNode): with nogil: err = cydriver.cuGraphNodeGetLocalId(cyhNode, &nodeId) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], nodeId) + return (CUresult(err), None) + return (CUresult(err), nodeId) {{endif}} {{if 'cuGraphNodeGetToolsId' in found_functions}} @@ -44616,8 +46087,8 @@ def cuGraphNodeGetToolsId(hNode): with nogil: err = cydriver.cuGraphNodeGetToolsId(cyhNode, &toolsNodeId) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], toolsNodeId) + return (CUresult(err), None) + return (CUresult(err), toolsNodeId) {{endif}} {{if 'cuGraphGetId' in found_functions}} @@ -44657,8 +46128,8 @@ def cuGraphGetId(hGraph): with nogil: err = cydriver.cuGraphGetId(cyhGraph, &graphId) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], graphId) + return (CUresult(err), None) + return (CUresult(err), graphId) {{endif}} {{if 'cuGraphExecGetId' in found_functions}} @@ -44698,8 +46169,8 @@ def cuGraphExecGetId(hGraphExec): with nogil: err = cydriver.cuGraphExecGetId(cyhGraphExec, &graphId) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], graphId) + return (CUresult(err), None) + return (CUresult(err), graphId) {{endif}} {{if 'cuGraphGetNodes' in found_functions}} @@ -44757,8 +46228,8 @@ def cuGraphGetNodes(hGraph, size_t numNodes = 0): if cynodes is not NULL: free(cynodes) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None) - return (_dict_CUresult[err], pynodes, numNodes) + return (CUresult(err), None, None) + return (CUresult(err), pynodes, numNodes) {{endif}} {{if 'cuGraphGetRootNodes' in found_functions}} @@ -44816,8 +46287,8 @@ def cuGraphGetRootNodes(hGraph, size_t numRootNodes = 0): if cyrootNodes is not NULL: free(cyrootNodes) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None) - return (_dict_CUresult[err], pyrootNodes, numRootNodes) + return (CUresult(err), None, None) + return (CUresult(err), pyrootNodes, numRootNodes) {{endif}} {{if 'cuGraphGetEdges_v2' in found_functions}} @@ -44906,8 +46377,8 @@ def cuGraphGetEdges(hGraph, size_t numEdges = 0): if cyedgeData is not NULL: free(cyedgeData) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None, None, None) - return (_dict_CUresult[err], pyfrom_, pyto, pyedgeData, numEdges) + return (CUresult(err), None, None, None, None) + return (CUresult(err), pyfrom_, pyto, pyedgeData, numEdges) {{endif}} {{if 'cuGraphNodeGetDependencies_v2' in found_functions}} @@ -44983,8 +46454,8 @@ def cuGraphNodeGetDependencies(hNode, size_t numDependencies = 0): if cyedgeData is not NULL: free(cyedgeData) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None, None) - return (_dict_CUresult[err], pydependencies, pyedgeData, numDependencies) + return (CUresult(err), None, None, None) + return (CUresult(err), pydependencies, pyedgeData, numDependencies) {{endif}} {{if 'cuGraphNodeGetDependentNodes_v2' in found_functions}} @@ -45060,8 +46531,8 @@ def cuGraphNodeGetDependentNodes(hNode, size_t numDependentNodes = 0): if cyedgeData is not NULL: free(cyedgeData) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None, None) - return (_dict_CUresult[err], pydependentNodes, pyedgeData, numDependentNodes) + return (CUresult(err), None, None, None) + return (CUresult(err), pydependentNodes, pyedgeData, numDependentNodes) {{endif}} {{if 'cuGraphAddDependencies_v2' in found_functions}} @@ -45154,7 +46625,7 @@ def cuGraphAddDependencies(hGraph, from_ : Optional[tuple[CUgraphNode] | list[CU free(cyto) if len(edgeData) > 1 and cyedgeData is not NULL: free(cyedgeData) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphRemoveDependencies_v2' in found_functions}} @@ -45253,7 +46724,7 @@ def cuGraphRemoveDependencies(hGraph, from_ : Optional[tuple[CUgraphNode] | list free(cyto) if len(edgeData) > 1 and cyedgeData is not NULL: free(cyedgeData) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphDestroyNode' in found_functions}} @@ -45292,7 +46763,7 @@ def cuGraphDestroyNode(hNode): cyhNode = phNode with nogil: err = cydriver.cuGraphDestroyNode(cyhNode) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphInstantiateWithFlags' in found_functions}} @@ -45396,8 +46867,8 @@ def cuGraphInstantiate(hGraph, unsigned long long flags): with nogil: err = cydriver.cuGraphInstantiate(phGraphExec._pvt_ptr, cyhGraph, flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phGraphExec) + return (CUresult(err), None) + return (CUresult(err), phGraphExec) {{endif}} {{if 'cuGraphInstantiateWithParams' in found_functions}} @@ -45542,8 +47013,8 @@ def cuGraphInstantiateWithParams(hGraph, instantiateParams : Optional[CUDA_GRAPH with nogil: err = cydriver.cuGraphInstantiateWithParams(phGraphExec._pvt_ptr, cyhGraph, cyinstantiateParams_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phGraphExec) + return (CUresult(err), None) + return (CUresult(err), phGraphExec) {{endif}} {{if 'cuGraphExecGetFlags' in found_functions}} @@ -45585,8 +47056,8 @@ def cuGraphExecGetFlags(hGraphExec): with nogil: err = cydriver.cuGraphExecGetFlags(cyhGraphExec, flags._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], flags) + return (CUresult(err), None) + return (CUresult(err), flags) {{endif}} {{if 'cuGraphExecKernelNodeSetParams_v2' in found_functions}} @@ -45667,7 +47138,7 @@ def cuGraphExecKernelNodeSetParams(hGraphExec, hNode, nodeParams : Optional[CUDA cdef cydriver.CUDA_KERNEL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphExecKernelNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphExecMemcpyNodeSetParams' in found_functions}} @@ -45742,7 +47213,7 @@ def cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams : Optional[CUDA cdef cydriver.CUDA_MEMCPY3D* cycopyParams_ptr = copyParams._pvt_ptr if copyParams is not None else NULL with nogil: err = cydriver.cuGraphExecMemcpyNodeSetParams(cyhGraphExec, cyhNode, cycopyParams_ptr, cyctx) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphExecMemsetNodeSetParams' in found_functions}} @@ -45822,7 +47293,7 @@ def cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams : Optional[CU cdef cydriver.CUDA_MEMSET_NODE_PARAMS* cymemsetParams_ptr = memsetParams._pvt_ptr if memsetParams is not None else NULL with nogil: err = cydriver.cuGraphExecMemsetNodeSetParams(cyhGraphExec, cyhNode, cymemsetParams_ptr, cyctx) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphExecHostNodeSetParams' in found_functions}} @@ -45877,7 +47348,7 @@ def cuGraphExecHostNodeSetParams(hGraphExec, hNode, nodeParams : Optional[CUDA_H cdef cydriver.CUDA_HOST_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphExecHostNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphExecChildGraphNodeSetParams' in found_functions}} @@ -45947,7 +47418,7 @@ def cuGraphExecChildGraphNodeSetParams(hGraphExec, hNode, childGraph): cyhGraphExec = phGraphExec with nogil: err = cydriver.cuGraphExecChildGraphNodeSetParams(cyhGraphExec, cyhNode, cychildGraph) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphExecEventRecordNodeSetEvent' in found_functions}} @@ -46010,7 +47481,7 @@ def cuGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event): cyhGraphExec = phGraphExec with nogil: err = cydriver.cuGraphExecEventRecordNodeSetEvent(cyhGraphExec, cyhNode, cyevent) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphExecEventWaitNodeSetEvent' in found_functions}} @@ -46073,7 +47544,7 @@ def cuGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event): cyhGraphExec = phGraphExec with nogil: err = cydriver.cuGraphExecEventWaitNodeSetEvent(cyhGraphExec, cyhNode, cyevent) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphExecExternalSemaphoresSignalNodeSetParams' in found_functions}} @@ -46133,7 +47604,7 @@ def cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodePara cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphExecExternalSemaphoresSignalNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphExecExternalSemaphoresWaitNodeSetParams' in found_functions}} @@ -46193,7 +47664,7 @@ def cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphExecExternalSemaphoresWaitNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphNodeSetEnabled' in found_functions}} @@ -46262,7 +47733,7 @@ def cuGraphNodeSetEnabled(hGraphExec, hNode, unsigned int isEnabled): cyhGraphExec = phGraphExec with nogil: err = cydriver.cuGraphNodeSetEnabled(cyhGraphExec, cyhNode, isEnabled) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphNodeGetEnabled' in found_functions}} @@ -46322,8 +47793,8 @@ def cuGraphNodeGetEnabled(hGraphExec, hNode): with nogil: err = cydriver.cuGraphNodeGetEnabled(cyhGraphExec, cyhNode, &isEnabled) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], isEnabled) + return (CUresult(err), None) + return (CUresult(err), isEnabled) {{endif}} {{if 'cuGraphUpload' in found_functions}} @@ -46372,7 +47843,7 @@ def cuGraphUpload(hGraphExec, hStream): cyhGraphExec = phGraphExec with nogil: err = cydriver.cuGraphUpload(cyhGraphExec, cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphLaunch' in found_functions}} @@ -46426,7 +47897,7 @@ def cuGraphLaunch(hGraphExec, hStream): cyhGraphExec = phGraphExec with nogil: err = cydriver.cuGraphLaunch(cyhGraphExec, cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphExecDestroy' in found_functions}} @@ -46463,7 +47934,7 @@ def cuGraphExecDestroy(hGraphExec): cyhGraphExec = phGraphExec with nogil: err = cydriver.cuGraphExecDestroy(cyhGraphExec) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphDestroy' in found_functions}} @@ -46498,7 +47969,7 @@ def cuGraphDestroy(hGraph): cyhGraph = phGraph with nogil: err = cydriver.cuGraphDestroy(cyhGraph) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphExecUpdate_v2' in found_functions}} @@ -46677,8 +48148,8 @@ def cuGraphExecUpdate(hGraphExec, hGraph): with nogil: err = cydriver.cuGraphExecUpdate(cyhGraphExec, cyhGraph, resultInfo._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], resultInfo) + return (CUresult(err), None) + return (CUresult(err), resultInfo) {{endif}} {{if 'cuGraphKernelNodeCopyAttributes' in found_functions}} @@ -46725,7 +48196,7 @@ def cuGraphKernelNodeCopyAttributes(dst, src): cydst = pdst with nogil: err = cydriver.cuGraphKernelNodeCopyAttributes(cydst, cysrc) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphKernelNodeGetAttribute' in found_functions}} @@ -46768,8 +48239,8 @@ def cuGraphKernelNodeGetAttribute(hNode, attr not None : CUkernelNodeAttrID): with nogil: err = cydriver.cuGraphKernelNodeGetAttribute(cyhNode, cyattr, value_out._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], value_out) + return (CUresult(err), None) + return (CUresult(err), value_out) {{endif}} {{if 'cuGraphKernelNodeSetAttribute' in found_functions}} @@ -46811,7 +48282,7 @@ def cuGraphKernelNodeSetAttribute(hNode, attr not None : CUkernelNodeAttrID, val cdef cydriver.CUkernelNodeAttrValue* cyvalue_ptr = value._pvt_ptr if value is not None else NULL with nogil: err = cydriver.cuGraphKernelNodeSetAttribute(cyhNode, cyattr, cyvalue_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphDebugDotPrint' in found_functions}} @@ -46851,7 +48322,7 @@ def cuGraphDebugDotPrint(hGraph, char* path, unsigned int flags): cyhGraph = phGraph with nogil: err = cydriver.cuGraphDebugDotPrint(cyhGraph, path, flags) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuUserObjectCreate' in found_functions}} @@ -46912,8 +48383,8 @@ def cuUserObjectCreate(ptr, destroy, unsigned int initialRefcount, unsigned int with nogil: err = cydriver.cuUserObjectCreate(object_out._pvt_ptr, cyptr_ptr, cydestroy, initialRefcount, flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], object_out) + return (CUresult(err), None) + return (CUresult(err), object_out) {{endif}} {{if 'cuUserObjectRetain' in found_functions}} @@ -46955,7 +48426,7 @@ def cuUserObjectRetain(object, unsigned int count): cyobject = pobject with nogil: err = cydriver.cuUserObjectRetain(cyobject, count) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuUserObjectRelease' in found_functions}} @@ -47000,7 +48471,7 @@ def cuUserObjectRelease(object, unsigned int count): cyobject = pobject with nogil: err = cydriver.cuUserObjectRelease(cyobject, count) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphRetainUserObject' in found_functions}} @@ -47056,7 +48527,7 @@ def cuGraphRetainUserObject(graph, object, unsigned int count, unsigned int flag cygraph = pgraph with nogil: err = cydriver.cuGraphRetainUserObject(cygraph, cyobject, count, flags) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphReleaseUserObject' in found_functions}} @@ -47107,7 +48578,7 @@ def cuGraphReleaseUserObject(graph, object, unsigned int count): cygraph = pgraph with nogil: err = cydriver.cuGraphReleaseUserObject(cygraph, cyobject, count) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphAddNode_v2' in found_functions}} @@ -47202,8 +48673,8 @@ def cuGraphAddNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | list[CUg if len(dependencyData) > 1 and cydependencyData is not NULL: free(cydependencyData) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phGraphNode) + return (CUresult(err), None) + return (CUresult(err), phGraphNode) {{endif}} {{if 'cuGraphNodeSetParams' in found_functions}} @@ -47247,7 +48718,7 @@ def cuGraphNodeSetParams(hNode, nodeParams : Optional[CUgraphNodeParams]): cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphNodeSetParams(cyhNode, cynodeParams_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphExecNodeSetParams' in found_functions}} @@ -47307,7 +48778,7 @@ def cuGraphExecNodeSetParams(hGraphExec, hNode, nodeParams : Optional[CUgraphNod cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphExecNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphConditionalHandleCreate' in found_functions}} @@ -47371,8 +48842,8 @@ def cuGraphConditionalHandleCreate(hGraph, ctx, unsigned int defaultLaunchValue, with nogil: err = cydriver.cuGraphConditionalHandleCreate(pHandle_out._pvt_ptr, cyhGraph, cyctx, defaultLaunchValue, flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pHandle_out) + return (CUresult(err), None) + return (CUresult(err), pHandle_out) {{endif}} {{if 'cuOccupancyMaxActiveBlocksPerMultiprocessor' in found_functions}} @@ -47422,8 +48893,8 @@ def cuOccupancyMaxActiveBlocksPerMultiprocessor(func, int blockSize, size_t dyna with nogil: err = cydriver.cuOccupancyMaxActiveBlocksPerMultiprocessor(&numBlocks, cyfunc, blockSize, dynamicSMemSize) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], numBlocks) + return (CUresult(err), None) + return (CUresult(err), numBlocks) {{endif}} {{if 'cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags' in found_functions}} @@ -47491,8 +48962,8 @@ def cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(func, int blockSize, si with nogil: err = cydriver.cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(&numBlocks, cyfunc, blockSize, dynamicSMemSize, flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], numBlocks) + return (CUresult(err), None) + return (CUresult(err), numBlocks) {{endif}} {{if 'cuOccupancyMaxPotentialBlockSize' in found_functions}} @@ -47578,8 +49049,8 @@ def cuOccupancyMaxPotentialBlockSize(func, blockSizeToDynamicSMemSize, size_t dy with nogil: err = cydriver.cuOccupancyMaxPotentialBlockSize(&minGridSize, &blockSize, cyfunc, cyblockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None) - return (_dict_CUresult[err], minGridSize, blockSize) + return (CUresult(err), None, None) + return (CUresult(err), minGridSize, blockSize) {{endif}} {{if 'cuOccupancyMaxPotentialBlockSizeWithFlags' in found_functions}} @@ -47664,8 +49135,8 @@ def cuOccupancyMaxPotentialBlockSizeWithFlags(func, blockSizeToDynamicSMemSize, with nogil: err = cydriver.cuOccupancyMaxPotentialBlockSizeWithFlags(&minGridSize, &blockSize, cyfunc, cyblockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None) - return (_dict_CUresult[err], minGridSize, blockSize) + return (CUresult(err), None, None) + return (CUresult(err), minGridSize, blockSize) {{endif}} {{if 'cuOccupancyAvailableDynamicSMemPerBlock' in found_functions}} @@ -47711,8 +49182,8 @@ def cuOccupancyAvailableDynamicSMemPerBlock(func, int numBlocks, int blockSize): with nogil: err = cydriver.cuOccupancyAvailableDynamicSMemPerBlock(&dynamicSmemSize, cyfunc, numBlocks, blockSize) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], dynamicSmemSize) + return (CUresult(err), None) + return (CUresult(err), dynamicSmemSize) {{endif}} {{if 'cuOccupancyMaxPotentialClusterSize' in found_functions}} @@ -47771,8 +49242,8 @@ def cuOccupancyMaxPotentialClusterSize(func, config : Optional[CUlaunchConfig]): with nogil: err = cydriver.cuOccupancyMaxPotentialClusterSize(&clusterSize, cyfunc, cyconfig_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], clusterSize) + return (CUresult(err), None) + return (CUresult(err), clusterSize) {{endif}} {{if 'cuOccupancyMaxActiveClusters' in found_functions}} @@ -47831,8 +49302,8 @@ def cuOccupancyMaxActiveClusters(func, config : Optional[CUlaunchConfig]): with nogil: err = cydriver.cuOccupancyMaxActiveClusters(&numClusters, cyfunc, cyconfig_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], numClusters) + return (CUresult(err), None) + return (CUresult(err), numClusters) {{endif}} {{if 'cuTexRefSetArray' in found_functions}} @@ -47885,7 +49356,7 @@ def cuTexRefSetArray(hTexRef, hArray, unsigned int Flags): cyhTexRef = phTexRef with nogil: err = cydriver.cuTexRefSetArray(cyhTexRef, cyhArray, Flags) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuTexRefSetMipmappedArray' in found_functions}} @@ -47938,7 +49409,7 @@ def cuTexRefSetMipmappedArray(hTexRef, hMipmappedArray, unsigned int Flags): cyhTexRef = phTexRef with nogil: err = cydriver.cuTexRefSetMipmappedArray(cyhTexRef, cyhMipmappedArray, Flags) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuTexRefSetAddress_v2' in found_functions}} @@ -48012,8 +49483,8 @@ def cuTexRefSetAddress(hTexRef, dptr, size_t numbytes): with nogil: err = cydriver.cuTexRefSetAddress(&ByteOffset, cyhTexRef, cydptr, numbytes) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], ByteOffset) + return (CUresult(err), None) + return (CUresult(err), ByteOffset) {{endif}} {{if 'cuTexRefSetAddress2D_v3' in found_functions}} @@ -48094,7 +49565,7 @@ def cuTexRefSetAddress2D(hTexRef, desc : Optional[CUDA_ARRAY_DESCRIPTOR], dptr, cdef cydriver.CUDA_ARRAY_DESCRIPTOR* cydesc_ptr = desc._pvt_ptr if desc is not None else NULL with nogil: err = cydriver.cuTexRefSetAddress2D(cyhTexRef, cydesc_ptr, cydptr, Pitch) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuTexRefSetFormat' in found_functions}} @@ -48140,7 +49611,7 @@ def cuTexRefSetFormat(hTexRef, fmt not None : CUarray_format, int NumPackedCompo cdef cydriver.CUarray_format cyfmt = int(fmt) with nogil: err = cydriver.cuTexRefSetFormat(cyhTexRef, cyfmt, NumPackedComponents) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuTexRefSetAddressMode' in found_functions}} @@ -48193,7 +49664,7 @@ def cuTexRefSetAddressMode(hTexRef, int dim, am not None : CUaddress_mode): cdef cydriver.CUaddress_mode cyam = int(am) with nogil: err = cydriver.cuTexRefSetAddressMode(cyhTexRef, dim, cyam) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuTexRefSetFilterMode' in found_functions}} @@ -48240,7 +49711,7 @@ def cuTexRefSetFilterMode(hTexRef, fm not None : CUfilter_mode): cdef cydriver.CUfilter_mode cyfm = int(fm) with nogil: err = cydriver.cuTexRefSetFilterMode(cyhTexRef, cyfm) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuTexRefSetMipmapFilterMode' in found_functions}} @@ -48287,7 +49758,7 @@ def cuTexRefSetMipmapFilterMode(hTexRef, fm not None : CUfilter_mode): cdef cydriver.CUfilter_mode cyfm = int(fm) with nogil: err = cydriver.cuTexRefSetMipmapFilterMode(cyhTexRef, cyfm) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuTexRefSetMipmapLevelBias' in found_functions}} @@ -48331,7 +49802,7 @@ def cuTexRefSetMipmapLevelBias(hTexRef, float bias): cyhTexRef = phTexRef with nogil: err = cydriver.cuTexRefSetMipmapLevelBias(cyhTexRef, bias) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuTexRefSetMipmapLevelClamp' in found_functions}} @@ -48377,7 +49848,7 @@ def cuTexRefSetMipmapLevelClamp(hTexRef, float minMipmapLevelClamp, float maxMip cyhTexRef = phTexRef with nogil: err = cydriver.cuTexRefSetMipmapLevelClamp(cyhTexRef, minMipmapLevelClamp, maxMipmapLevelClamp) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuTexRefSetMaxAnisotropy' in found_functions}} @@ -48420,7 +49891,7 @@ def cuTexRefSetMaxAnisotropy(hTexRef, unsigned int maxAniso): cyhTexRef = phTexRef with nogil: err = cydriver.cuTexRefSetMaxAnisotropy(cyhTexRef, maxAniso) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuTexRefSetBorderColor' in found_functions}} @@ -48468,7 +49939,7 @@ def cuTexRefSetBorderColor(hTexRef, float pBorderColor): cyhTexRef = phTexRef with nogil: err = cydriver.cuTexRefSetBorderColor(cyhTexRef, &pBorderColor) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuTexRefSetFlags' in found_functions}} @@ -48526,7 +49997,7 @@ def cuTexRefSetFlags(hTexRef, unsigned int Flags): cyhTexRef = phTexRef with nogil: err = cydriver.cuTexRefSetFlags(cyhTexRef, Flags) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuTexRefGetAddress_v2' in found_functions}} @@ -48569,8 +50040,8 @@ def cuTexRefGetAddress(hTexRef): with nogil: err = cydriver.cuTexRefGetAddress(pdptr._pvt_ptr, cyhTexRef) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pdptr) + return (CUresult(err), None) + return (CUresult(err), pdptr) {{endif}} {{if 'cuTexRefGetArray' in found_functions}} @@ -48613,8 +50084,8 @@ def cuTexRefGetArray(hTexRef): with nogil: err = cydriver.cuTexRefGetArray(phArray._pvt_ptr, cyhTexRef) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phArray) + return (CUresult(err), None) + return (CUresult(err), phArray) {{endif}} {{if 'cuTexRefGetMipmappedArray' in found_functions}} @@ -48658,8 +50129,8 @@ def cuTexRefGetMipmappedArray(hTexRef): with nogil: err = cydriver.cuTexRefGetMipmappedArray(phMipmappedArray._pvt_ptr, cyhTexRef) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phMipmappedArray) + return (CUresult(err), None) + return (CUresult(err), phMipmappedArray) {{endif}} {{if 'cuTexRefGetAddressMode' in found_functions}} @@ -48704,8 +50175,8 @@ def cuTexRefGetAddressMode(hTexRef, int dim): with nogil: err = cydriver.cuTexRefGetAddressMode(&pam, cyhTexRef, dim) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], CUaddress_mode(pam)) + return (CUresult(err), None) + return (CUresult(err), CUaddress_mode(pam)) {{endif}} {{if 'cuTexRefGetFilterMode' in found_functions}} @@ -48747,8 +50218,8 @@ def cuTexRefGetFilterMode(hTexRef): with nogil: err = cydriver.cuTexRefGetFilterMode(&pfm, cyhTexRef) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], CUfilter_mode(pfm)) + return (CUresult(err), None) + return (CUresult(err), CUfilter_mode(pfm)) {{endif}} {{if 'cuTexRefGetFormat' in found_functions}} @@ -48794,8 +50265,8 @@ def cuTexRefGetFormat(hTexRef): with nogil: err = cydriver.cuTexRefGetFormat(&pFormat, &pNumChannels, cyhTexRef) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None) - return (_dict_CUresult[err], CUarray_format(pFormat), pNumChannels) + return (CUresult(err), None, None) + return (CUresult(err), CUarray_format(pFormat), pNumChannels) {{endif}} {{if 'cuTexRefGetMipmapFilterMode' in found_functions}} @@ -48837,8 +50308,8 @@ def cuTexRefGetMipmapFilterMode(hTexRef): with nogil: err = cydriver.cuTexRefGetMipmapFilterMode(&pfm, cyhTexRef) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], CUfilter_mode(pfm)) + return (CUresult(err), None) + return (CUresult(err), CUfilter_mode(pfm)) {{endif}} {{if 'cuTexRefGetMipmapLevelBias' in found_functions}} @@ -48881,8 +50352,8 @@ def cuTexRefGetMipmapLevelBias(hTexRef): with nogil: err = cydriver.cuTexRefGetMipmapLevelBias(&pbias, cyhTexRef) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pbias) + return (CUresult(err), None) + return (CUresult(err), pbias) {{endif}} {{if 'cuTexRefGetMipmapLevelClamp' in found_functions}} @@ -48928,8 +50399,8 @@ def cuTexRefGetMipmapLevelClamp(hTexRef): with nogil: err = cydriver.cuTexRefGetMipmapLevelClamp(&pminMipmapLevelClamp, &pmaxMipmapLevelClamp, cyhTexRef) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None) - return (_dict_CUresult[err], pminMipmapLevelClamp, pmaxMipmapLevelClamp) + return (CUresult(err), None, None) + return (CUresult(err), pminMipmapLevelClamp, pmaxMipmapLevelClamp) {{endif}} {{if 'cuTexRefGetMaxAnisotropy' in found_functions}} @@ -48971,8 +50442,8 @@ def cuTexRefGetMaxAnisotropy(hTexRef): with nogil: err = cydriver.cuTexRefGetMaxAnisotropy(&pmaxAniso, cyhTexRef) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pmaxAniso) + return (CUresult(err), None) + return (CUresult(err), pmaxAniso) {{endif}} {{if 'cuTexRefGetBorderColor' in found_functions}} @@ -49017,8 +50488,8 @@ def cuTexRefGetBorderColor(hTexRef): with nogil: err = cydriver.cuTexRefGetBorderColor(&pBorderColor, cyhTexRef) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pBorderColor) + return (CUresult(err), None) + return (CUresult(err), pBorderColor) {{endif}} {{if 'cuTexRefGetFlags' in found_functions}} @@ -49059,8 +50530,8 @@ def cuTexRefGetFlags(hTexRef): with nogil: err = cydriver.cuTexRefGetFlags(&pFlags, cyhTexRef) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pFlags) + return (CUresult(err), None) + return (CUresult(err), pFlags) {{endif}} {{if 'cuTexRefCreate' in found_functions}} @@ -49093,8 +50564,8 @@ def cuTexRefCreate(): with nogil: err = cydriver.cuTexRefCreate(pTexRef._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pTexRef) + return (CUresult(err), None) + return (CUresult(err), pTexRef) {{endif}} {{if 'cuTexRefDestroy' in found_functions}} @@ -49131,7 +50602,7 @@ def cuTexRefDestroy(hTexRef): cyhTexRef = phTexRef with nogil: err = cydriver.cuTexRefDestroy(cyhTexRef) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuSurfRefSetArray' in found_functions}} @@ -49185,7 +50656,7 @@ def cuSurfRefSetArray(hSurfRef, hArray, unsigned int Flags): cyhSurfRef = phSurfRef with nogil: err = cydriver.cuSurfRefSetArray(cyhSurfRef, cyhArray, Flags) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuSurfRefGetArray' in found_functions}} @@ -49228,8 +50699,8 @@ def cuSurfRefGetArray(hSurfRef): with nogil: err = cydriver.cuSurfRefGetArray(phArray._pvt_ptr, cyhSurfRef) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phArray) + return (CUresult(err), None) + return (CUresult(err), phArray) {{endif}} {{if 'cuTexObjectCreate' in found_functions}} @@ -49468,8 +50939,8 @@ def cuTexObjectCreate(pResDesc : Optional[CUDA_RESOURCE_DESC], pTexDesc : Option with nogil: err = cydriver.cuTexObjectCreate(pTexObject._pvt_ptr, cypResDesc_ptr, cypTexDesc_ptr, cypResViewDesc_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pTexObject) + return (CUresult(err), None) + return (CUresult(err), pTexObject) {{endif}} {{if 'cuTexObjectDestroy' in found_functions}} @@ -49504,7 +50975,7 @@ def cuTexObjectDestroy(texObject): cytexObject = ptexObject with nogil: err = cydriver.cuTexObjectDestroy(cytexObject) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuTexObjectGetResourceDesc' in found_functions}} @@ -49544,8 +51015,8 @@ def cuTexObjectGetResourceDesc(texObject): with nogil: err = cydriver.cuTexObjectGetResourceDesc(pResDesc._pvt_ptr, cytexObject) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pResDesc) + return (CUresult(err), None) + return (CUresult(err), pResDesc) {{endif}} {{if 'cuTexObjectGetTextureDesc' in found_functions}} @@ -49585,8 +51056,8 @@ def cuTexObjectGetTextureDesc(texObject): with nogil: err = cydriver.cuTexObjectGetTextureDesc(pTexDesc._pvt_ptr, cytexObject) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pTexDesc) + return (CUresult(err), None) + return (CUresult(err), pTexDesc) {{endif}} {{if 'cuTexObjectGetResourceViewDesc' in found_functions}} @@ -49627,8 +51098,8 @@ def cuTexObjectGetResourceViewDesc(texObject): with nogil: err = cydriver.cuTexObjectGetResourceViewDesc(pResViewDesc._pvt_ptr, cytexObject) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pResViewDesc) + return (CUresult(err), None) + return (CUresult(err), pResViewDesc) {{endif}} {{if 'cuSurfObjectCreate' in found_functions}} @@ -49670,8 +51141,8 @@ def cuSurfObjectCreate(pResDesc : Optional[CUDA_RESOURCE_DESC]): with nogil: err = cydriver.cuSurfObjectCreate(pSurfObject._pvt_ptr, cypResDesc_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pSurfObject) + return (CUresult(err), None) + return (CUresult(err), pSurfObject) {{endif}} {{if 'cuSurfObjectDestroy' in found_functions}} @@ -49706,7 +51177,7 @@ def cuSurfObjectDestroy(surfObject): cysurfObject = psurfObject with nogil: err = cydriver.cuSurfObjectDestroy(cysurfObject) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuSurfObjectGetResourceDesc' in found_functions}} @@ -49746,8 +51217,8 @@ def cuSurfObjectGetResourceDesc(surfObject): with nogil: err = cydriver.cuSurfObjectGetResourceDesc(pResDesc._pvt_ptr, cysurfObject) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pResDesc) + return (CUresult(err), None) + return (CUresult(err), pResDesc) {{endif}} {{if 'cuTensorMapEncodeTiled' in found_functions}} @@ -50053,8 +51524,8 @@ def cuTensorMapEncodeTiled(tensorDataType not None : CUtensorMapDataType, tensor with nogil: err = cydriver.cuTensorMapEncodeTiled(tensorMap._pvt_ptr, cytensorDataType, cytensorRank, cyglobalAddress_ptr, cyglobalDim, cyglobalStrides, cyboxDim, cyelementStrides, cyinterleave, cyswizzle, cyl2Promotion, cyoobFill) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], tensorMap) + return (CUresult(err), None) + return (CUresult(err), tensorMap) {{endif}} {{if 'cuTensorMapEncodeIm2col' in found_functions}} @@ -50397,8 +51868,8 @@ def cuTensorMapEncodeIm2col(tensorDataType not None : CUtensorMapDataType, tenso with nogil: err = cydriver.cuTensorMapEncodeIm2col(tensorMap._pvt_ptr, cytensorDataType, cytensorRank, cyglobalAddress_ptr, cyglobalDim, cyglobalStrides, cypixelBoxLowerCorner.data(), cypixelBoxUpperCorner.data(), cychannelsPerPixel, cypixelsPerColumn, cyelementStrides, cyinterleave, cyswizzle, cyl2Promotion, cyoobFill) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], tensorMap) + return (CUresult(err), None) + return (CUresult(err), tensorMap) {{endif}} {{if 'cuTensorMapEncodeIm2colWide' in found_functions}} @@ -50721,8 +52192,8 @@ def cuTensorMapEncodeIm2colWide(tensorDataType not None : CUtensorMapDataType, t with nogil: err = cydriver.cuTensorMapEncodeIm2colWide(tensorMap._pvt_ptr, cytensorDataType, cytensorRank, cyglobalAddress_ptr, cyglobalDim, cyglobalStrides, pixelBoxLowerCornerWidth, pixelBoxUpperCornerWidth, cychannelsPerPixel, cypixelsPerColumn, cyelementStrides, cyinterleave, cymode, cyswizzle, cyl2Promotion, cyoobFill) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], tensorMap) + return (CUresult(err), None) + return (CUresult(err), tensorMap) {{endif}} {{if 'cuTensorMapReplaceAddress' in found_functions}} @@ -50760,7 +52231,7 @@ def cuTensorMapReplaceAddress(tensorMap : Optional[CUtensorMap], globalAddress): cdef void* cyglobalAddress_ptr = cyglobalAddress.cptr with nogil: err = cydriver.cuTensorMapReplaceAddress(cytensorMap_ptr, cyglobalAddress_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuDeviceCanAccessPeer' in found_functions}} @@ -50815,8 +52286,8 @@ def cuDeviceCanAccessPeer(dev, peerDev): with nogil: err = cydriver.cuDeviceCanAccessPeer(&canAccessPeer, cydev, cypeerDev) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], canAccessPeer) + return (CUresult(err), None) + return (CUresult(err), canAccessPeer) {{endif}} {{if 'cuCtxEnablePeerAccess' in found_functions}} @@ -50886,7 +52357,7 @@ def cuCtxEnablePeerAccess(peerContext, unsigned int Flags): cypeerContext = ppeerContext with nogil: err = cydriver.cuCtxEnablePeerAccess(cypeerContext, Flags) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuCtxDisablePeerAccess' in found_functions}} @@ -50926,7 +52397,7 @@ def cuCtxDisablePeerAccess(peerContext): cypeerContext = ppeerContext with nogil: err = cydriver.cuCtxDisablePeerAccess(cypeerContext) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuDeviceGetP2PAttribute' in found_functions}} @@ -51004,8 +52475,8 @@ def cuDeviceGetP2PAttribute(attrib not None : CUdevice_P2PAttribute, srcDevice, with nogil: err = cydriver.cuDeviceGetP2PAttribute(&value, cyattrib, cysrcDevice, cydstDevice) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], value) + return (CUresult(err), None) + return (CUresult(err), value) {{endif}} {{if 'cuDeviceGetP2PAtomicCapabilities' in found_functions}} @@ -51087,8 +52558,8 @@ def cuDeviceGetP2PAtomicCapabilities(operations : Optional[tuple[CUatomicOperati if cycapabilities is not NULL: free(cycapabilities) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pycapabilities) + return (CUresult(err), None) + return (CUresult(err), pycapabilities) {{endif}} {{if 'cuGraphicsUnregisterResource' in found_functions}} @@ -51127,7 +52598,7 @@ def cuGraphicsUnregisterResource(resource): cyresource = presource with nogil: err = cydriver.cuGraphicsUnregisterResource(cyresource) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphicsSubResourceGetMappedArray' in found_functions}} @@ -51184,8 +52655,8 @@ def cuGraphicsSubResourceGetMappedArray(resource, unsigned int arrayIndex, unsig with nogil: err = cydriver.cuGraphicsSubResourceGetMappedArray(pArray._pvt_ptr, cyresource, arrayIndex, mipLevel) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pArray) + return (CUresult(err), None) + return (CUresult(err), pArray) {{endif}} {{if 'cuGraphicsResourceGetMappedMipmappedArray' in found_functions}} @@ -51231,8 +52702,8 @@ def cuGraphicsResourceGetMappedMipmappedArray(resource): with nogil: err = cydriver.cuGraphicsResourceGetMappedMipmappedArray(pMipmappedArray._pvt_ptr, cyresource) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pMipmappedArray) + return (CUresult(err), None) + return (CUresult(err), pMipmappedArray) {{endif}} {{if 'cuGraphicsResourceGetMappedPointer_v2' in found_functions}} @@ -51278,8 +52749,8 @@ def cuGraphicsResourceGetMappedPointer(resource): with nogil: err = cydriver.cuGraphicsResourceGetMappedPointer(pDevPtr._pvt_ptr, &pSize, cyresource) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None) - return (_dict_CUresult[err], pDevPtr, pSize) + return (CUresult(err), None, None) + return (CUresult(err), pDevPtr, pSize) {{endif}} {{if 'cuGraphicsResourceSetMapFlags_v2' in found_functions}} @@ -51338,7 +52809,7 @@ def cuGraphicsResourceSetMapFlags(resource, unsigned int flags): cyresource = presource with nogil: err = cydriver.cuGraphicsResourceSetMapFlags(cyresource, flags) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphicsMapResources' in found_functions}} @@ -51401,7 +52872,7 @@ def cuGraphicsMapResources(unsigned int count, resources, hStream): raise TypeError("Argument 'resources' is not instance of type (expected , found " + str(type(resources))) with nogil: err = cydriver.cuGraphicsMapResources(count, cyresources, cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGraphicsUnmapResources' in found_functions}} @@ -51462,7 +52933,7 @@ def cuGraphicsUnmapResources(unsigned int count, resources, hStream): raise TypeError("Argument 'resources' is not instance of type (expected , found " + str(type(resources))) with nogil: err = cydriver.cuGraphicsUnmapResources(count, cyresources, cyhStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGetProcAddress_v2' in found_functions}} @@ -51567,8 +53038,8 @@ def cuGetProcAddress(char* symbol, int cudaVersion, flags): with nogil: err = cydriver.cuGetProcAddress(symbol, &pfn, cudaVersion, cyflags, &symbolStatus) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None) - return (_dict_CUresult[err], pfn, CUdriverProcAddressQueryResult(symbolStatus)) + return (CUresult(err), None, None) + return (CUresult(err), pfn, CUdriverProcAddressQueryResult(symbolStatus)) {{endif}} {{if 'cuCoredumpGetAttribute' in found_functions}} @@ -51687,8 +53158,8 @@ def cuCoredumpGetAttribute(attrib not None : CUcoredumpSettings): with nogil: err = cydriver.cuCoredumpGetAttribute(cyattrib, cyvalue_ptr, &size) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], cyvalue.pyObj()) + return (CUresult(err), None) + return (CUresult(err), cyvalue.pyObj()) {{endif}} {{if 'cuCoredumpGetAttributeGlobal' in found_functions}} @@ -51803,8 +53274,8 @@ def cuCoredumpGetAttributeGlobal(attrib not None : CUcoredumpSettings): with nogil: err = cydriver.cuCoredumpGetAttributeGlobal(cyattrib, cyvalue_ptr, &size) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], cyvalue.pyObj()) + return (CUresult(err), None) + return (CUresult(err), cyvalue.pyObj()) {{endif}} {{if 'cuCoredumpSetAttribute' in found_functions}} @@ -51925,7 +53396,7 @@ def cuCoredumpSetAttribute(attrib not None : CUcoredumpSettings, value): cdef size_t size = cyvalue.size() with nogil: err = cydriver.cuCoredumpSetAttribute(cyattrib, cyvalue_ptr, &size) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuCoredumpSetAttributeGlobal' in found_functions}} @@ -52051,7 +53522,7 @@ def cuCoredumpSetAttributeGlobal(attrib not None : CUcoredumpSettings, value): cdef size_t size = cyvalue.size() with nogil: err = cydriver.cuCoredumpSetAttributeGlobal(cyattrib, cyvalue_ptr, &size) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGetExportTable' in found_functions}} @@ -52077,8 +53548,8 @@ def cuGetExportTable(pExportTableId : Optional[CUuuid]): with nogil: err = cydriver.cuGetExportTable(&ppExportTable, cypExportTableId_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], ppExportTable) + return (CUresult(err), None) + return (CUresult(err), ppExportTable) {{endif}} {{if 'cuGreenCtxCreate' in found_functions}} @@ -52153,8 +53624,8 @@ def cuGreenCtxCreate(desc, dev, unsigned int flags): with nogil: err = cydriver.cuGreenCtxCreate(phCtx._pvt_ptr, cydesc, cydev, flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phCtx) + return (CUresult(err), None) + return (CUresult(err), phCtx) {{endif}} {{if 'cuGreenCtxDestroy' in found_functions}} @@ -52204,7 +53675,7 @@ def cuGreenCtxDestroy(hCtx): cyhCtx = phCtx with nogil: err = cydriver.cuGreenCtxDestroy(cyhCtx) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuCtxFromGreenCtx' in found_functions}} @@ -52252,8 +53723,8 @@ def cuCtxFromGreenCtx(hCtx): with nogil: err = cydriver.cuCtxFromGreenCtx(pContext._pvt_ptr, cyhCtx) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pContext) + return (CUresult(err), None) + return (CUresult(err), pContext) {{endif}} {{if 'cuDeviceGetDevResource' in found_functions}} @@ -52299,8 +53770,8 @@ def cuDeviceGetDevResource(device, typename not None : CUdevResourceType): with nogil: err = cydriver.cuDeviceGetDevResource(cydevice, resource._pvt_ptr, cytypename) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], resource) + return (CUresult(err), None) + return (CUresult(err), resource) {{endif}} {{if 'cuCtxGetDevResource' in found_functions}} @@ -52343,8 +53814,8 @@ def cuCtxGetDevResource(hCtx, typename not None : CUdevResourceType): with nogil: err = cydriver.cuCtxGetDevResource(cyhCtx, resource._pvt_ptr, cytypename) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], resource) + return (CUresult(err), None) + return (CUresult(err), resource) {{endif}} {{if 'cuGreenCtxGetDevResource' in found_functions}} @@ -52387,8 +53858,8 @@ def cuGreenCtxGetDevResource(hCtx, typename not None : CUdevResourceType): with nogil: err = cydriver.cuGreenCtxGetDevResource(cyhCtx, resource._pvt_ptr, cytypename) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], resource) + return (CUresult(err), None) + return (CUresult(err), resource) {{endif}} {{if 'cuDevSmResourceSplitByCount' in found_functions}} @@ -52511,8 +53982,8 @@ def cuDevSmResourceSplitByCount(unsigned int nbGroups, input_ : Optional[CUdevRe if cyresult is not NULL: free(cyresult) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None, None) - return (_dict_CUresult[err], pyresult, cynbGroups, remainder) + return (CUresult(err), None, None, None) + return (CUresult(err), pyresult, cynbGroups, remainder) {{endif}} {{if 'cuDevSmResourceSplit' in found_functions}} @@ -52672,8 +54143,8 @@ def cuDevSmResourceSplit(unsigned int nbGroups, input_ : Optional[CUdevResource] if cyresult is not NULL: free(cyresult) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None) - return (_dict_CUresult[err], pyresult, remainder) + return (CUresult(err), None, None) + return (CUresult(err), pyresult, remainder) {{endif}} {{if 'cuDevResourceGenerateDesc' in found_functions}} @@ -52740,8 +54211,8 @@ def cuDevResourceGenerateDesc(resources : Optional[tuple[CUdevResource] | list[C if len(resources) > 1 and cyresources is not NULL: free(cyresources) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phDesc) + return (CUresult(err), None) + return (CUresult(err), phDesc) {{endif}} {{if 'cuGreenCtxRecordEvent' in found_functions}} @@ -52796,7 +54267,7 @@ def cuGreenCtxRecordEvent(hCtx, hEvent): cyhCtx = phCtx with nogil: err = cydriver.cuGreenCtxRecordEvent(cyhCtx, cyhEvent) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuGreenCtxWaitEvent' in found_functions}} @@ -52851,7 +54322,7 @@ def cuGreenCtxWaitEvent(hCtx, hEvent): cyhCtx = phCtx with nogil: err = cydriver.cuGreenCtxWaitEvent(cyhCtx, cyhEvent) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuStreamGetGreenCtx' in found_functions}} @@ -52910,8 +54381,8 @@ def cuStreamGetGreenCtx(hStream): with nogil: err = cydriver.cuStreamGetGreenCtx(cyhStream, phCtx._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phCtx) + return (CUresult(err), None) + return (CUresult(err), phCtx) {{endif}} {{if 'cuGreenCtxStreamCreate' in found_functions}} @@ -52985,8 +54456,8 @@ def cuGreenCtxStreamCreate(greenCtx, unsigned int flags, int priority): with nogil: err = cydriver.cuGreenCtxStreamCreate(phStream._pvt_ptr, cygreenCtx, flags, priority) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phStream) + return (CUresult(err), None) + return (CUresult(err), phStream) {{endif}} {{if 'cuGreenCtxGetId' in found_functions}} @@ -53029,8 +54500,8 @@ def cuGreenCtxGetId(greenCtx): with nogil: err = cydriver.cuGreenCtxGetId(cygreenCtx, &greenCtxId) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], greenCtxId) + return (CUresult(err), None) + return (CUresult(err), greenCtxId) {{endif}} {{if 'cuStreamGetDevResource' in found_functions}} @@ -53077,8 +54548,8 @@ def cuStreamGetDevResource(hStream, typename not None : CUdevResourceType): with nogil: err = cydriver.cuStreamGetDevResource(cyhStream, resource._pvt_ptr, cytypename) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], resource) + return (CUresult(err), None) + return (CUresult(err), resource) {{endif}} {{if 'cuLogsRegisterCallback' in found_functions}} @@ -53141,8 +54612,8 @@ def cuLogsRegisterCallback(callbackFunc, userData): else: m_global._allocated[int(callback_out)] = cbData if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], callback_out) + return (CUresult(err), None) + return (CUresult(err), callback_out) {{endif}} {{if 'cuLogsUnregisterCallback' in found_functions}} @@ -53174,7 +54645,7 @@ def cuLogsUnregisterCallback(callback): if err == cydriver.CUDA_SUCCESS: free(m_global._allocated[pcallback]) m_global._allocated.erase(pcallback) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuLogsCurrent' in found_functions}} @@ -53199,8 +54670,8 @@ def cuLogsCurrent(unsigned int flags): with nogil: err = cydriver.cuLogsCurrent(iterator_out._pvt_ptr, flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], iterator_out) + return (CUresult(err), None) + return (CUresult(err), iterator_out) {{endif}} {{if 'cuLogsDumpToFile' in found_functions}} @@ -53243,8 +54714,8 @@ def cuLogsDumpToFile(iterator : Optional[CUlogIterator], char* pathToFile, unsig with nogil: err = cydriver.cuLogsDumpToFile(cyiterator, pathToFile, flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], iterator) + return (CUresult(err), None) + return (CUresult(err), iterator) {{endif}} {{if 'cuLogsDumpToMemory' in found_functions}} @@ -53301,8 +54772,8 @@ def cuLogsDumpToMemory(iterator : Optional[CUlogIterator], char* buffer, size_t with nogil: err = cydriver.cuLogsDumpToMemory(cyiterator, buffer, &size, flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None) - return (_dict_CUresult[err], iterator, size) + return (CUresult(err), None, None) + return (CUresult(err), iterator, size) {{endif}} {{if 'cuCheckpointProcessGetRestoreThreadId' in found_functions}} @@ -53330,8 +54801,8 @@ def cuCheckpointProcessGetRestoreThreadId(int pid): with nogil: err = cydriver.cuCheckpointProcessGetRestoreThreadId(pid, &tid) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], tid) + return (CUresult(err), None) + return (CUresult(err), tid) {{endif}} {{if 'cuCheckpointProcessGetState' in found_functions}} @@ -53359,8 +54830,8 @@ def cuCheckpointProcessGetState(int pid): with nogil: err = cydriver.cuCheckpointProcessGetState(pid, &state) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], CUprocessState(state)) + return (CUresult(err), None) + return (CUresult(err), CUprocessState(state)) {{endif}} {{if 'cuCheckpointProcessLock' in found_functions}} @@ -53392,7 +54863,7 @@ def cuCheckpointProcessLock(int pid, args : Optional[CUcheckpointLockArgs]): cdef cydriver.CUcheckpointLockArgs* cyargs_ptr = args._pvt_ptr if args is not None else NULL with nogil: err = cydriver.cuCheckpointProcessLock(pid, cyargs_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuCheckpointProcessCheckpoint' in found_functions}} @@ -53423,7 +54894,7 @@ def cuCheckpointProcessCheckpoint(int pid, args : Optional[CUcheckpointCheckpoin cdef cydriver.CUcheckpointCheckpointArgs* cyargs_ptr = args._pvt_ptr if args is not None else NULL with nogil: err = cydriver.cuCheckpointProcessCheckpoint(pid, cyargs_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuCheckpointProcessRestore' in found_functions}} @@ -53464,7 +54935,7 @@ def cuCheckpointProcessRestore(int pid, args : Optional[CUcheckpointRestoreArgs] cdef cydriver.CUcheckpointRestoreArgs* cyargs_ptr = args._pvt_ptr if args is not None else NULL with nogil: err = cydriver.cuCheckpointProcessRestore(pid, cyargs_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuCheckpointProcessUnlock' in found_functions}} @@ -53493,7 +54964,7 @@ def cuCheckpointProcessUnlock(int pid, args : Optional[CUcheckpointUnlockArgs]): cdef cydriver.CUcheckpointUnlockArgs* cyargs_ptr = args._pvt_ptr if args is not None else NULL with nogil: err = cydriver.cuCheckpointProcessUnlock(pid, cyargs_ptr) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuProfilerStart' in found_functions}} @@ -53521,7 +54992,7 @@ def cuProfilerStart(): """ with nogil: err = cydriver.cuProfilerStart() - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if 'cuProfilerStop' in found_functions}} @@ -53549,7 +55020,7 @@ def cuProfilerStop(): """ with nogil: err = cydriver.cuProfilerStop() - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if True}} @@ -53624,8 +55095,8 @@ def cuGraphicsEGLRegisterImage(image, unsigned int flags): with nogil: err = cydriver.cuGraphicsEGLRegisterImage(pCudaResource._pvt_ptr, cyimage, flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pCudaResource) + return (CUresult(err), None) + return (CUresult(err), pCudaResource) {{endif}} {{if True}} @@ -53667,8 +55138,8 @@ def cuEGLStreamConsumerConnect(stream): with nogil: err = cydriver.cuEGLStreamConsumerConnect(conn._pvt_ptr, cystream) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], conn) + return (CUresult(err), None) + return (CUresult(err), conn) {{endif}} {{if True}} @@ -53714,8 +55185,8 @@ def cuEGLStreamConsumerConnectWithFlags(stream, unsigned int flags): with nogil: err = cydriver.cuEGLStreamConsumerConnectWithFlags(conn._pvt_ptr, cystream, flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], conn) + return (CUresult(err), None) + return (CUresult(err), conn) {{endif}} {{if True}} @@ -53752,7 +55223,7 @@ def cuEGLStreamConsumerDisconnect(conn): raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) with nogil: err = cydriver.cuEGLStreamConsumerDisconnect(cyconn) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if True}} @@ -53824,7 +55295,7 @@ def cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, unsigned int t raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) with nogil: err = cydriver.cuEGLStreamConsumerAcquireFrame(cyconn, cypCudaResource, cypStream, timeout) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if True}} @@ -53887,7 +55358,7 @@ def cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream): raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) with nogil: err = cydriver.cuEGLStreamConsumerReleaseFrame(cyconn, cypCudaResource, cypStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if True}} @@ -53949,8 +55420,8 @@ def cuEGLStreamProducerConnect(stream, width, height): with nogil: err = cydriver.cuEGLStreamProducerConnect(conn._pvt_ptr, cystream, cywidth, cyheight) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], conn) + return (CUresult(err), None) + return (CUresult(err), conn) {{endif}} {{if True}} @@ -53987,7 +55458,7 @@ def cuEGLStreamProducerDisconnect(conn): raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) with nogil: err = cydriver.cuEGLStreamProducerDisconnect(cyconn) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if True}} @@ -54057,7 +55528,7 @@ def cuEGLStreamProducerPresentFrame(conn, eglframe not None : CUeglFrame, pStrea raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) with nogil: err = cydriver.cuEGLStreamProducerPresentFrame(cyconn, eglframe._pvt_ptr[0], cypStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if True}} @@ -54112,7 +55583,7 @@ def cuEGLStreamProducerReturnFrame(conn, eglframe : Optional[CUeglFrame], pStrea cdef cydriver.CUeglFrame* cyeglframe_ptr = eglframe._pvt_ptr if eglframe is not None else NULL with nogil: err = cydriver.cuEGLStreamProducerReturnFrame(cyconn, cyeglframe_ptr, cypStream) - return (_dict_CUresult[err],) + return (CUresult(err),) {{endif}} {{if True}} @@ -54160,8 +55631,8 @@ def cuGraphicsResourceGetMappedEglFrame(resource, unsigned int index, unsigned i with nogil: err = cydriver.cuGraphicsResourceGetMappedEglFrame(eglFrame._pvt_ptr, cyresource, index, mipLevel) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], eglFrame) + return (CUresult(err), None) + return (CUresult(err), eglFrame) {{endif}} {{if True}} @@ -54219,8 +55690,8 @@ def cuEventCreateFromEGLSync(eglSync, unsigned int flags): with nogil: err = cydriver.cuEventCreateFromEGLSync(phEvent._pvt_ptr, cyeglSync, flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], phEvent) + return (CUresult(err), None) + return (CUresult(err), phEvent) {{endif}} {{if True}} @@ -54276,8 +55747,8 @@ def cuGraphicsGLRegisterBuffer(buffer, unsigned int Flags): with nogil: err = cydriver.cuGraphicsGLRegisterBuffer(pCudaResource._pvt_ptr, cybuffer, Flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pCudaResource) + return (CUresult(err), None) + return (CUresult(err), pCudaResource) {{endif}} {{if True}} @@ -54376,8 +55847,8 @@ def cuGraphicsGLRegisterImage(image, target, unsigned int Flags): with nogil: err = cydriver.cuGraphicsGLRegisterImage(pCudaResource._pvt_ptr, cyimage, cytarget, Flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pCudaResource) + return (CUresult(err), None) + return (CUresult(err), pCudaResource) {{endif}} {{if True}} @@ -54445,8 +55916,8 @@ def cuGLGetDevices(unsigned int cudaDeviceCount, deviceList not None : CUGLDevic if cypCudaDevices is not NULL: free(cypCudaDevices) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None, None) - return (_dict_CUresult[err], pCudaDeviceCount, pypCudaDevices) + return (CUresult(err), None, None) + return (CUresult(err), pCudaDeviceCount, pypCudaDevices) {{endif}} {{if True}} @@ -54498,8 +55969,8 @@ def cuVDPAUGetDevice(vdpDevice, vdpGetProcAddress): with nogil: err = cydriver.cuVDPAUGetDevice(pDevice._pvt_ptr, cyvdpDevice, cyvdpGetProcAddress) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pDevice) + return (CUresult(err), None) + return (CUresult(err), pDevice) {{endif}} {{if True}} @@ -54566,8 +56037,8 @@ def cuVDPAUCtxCreate(unsigned int flags, device, vdpDevice, vdpGetProcAddress): with nogil: err = cydriver.cuVDPAUCtxCreate(pCtx._pvt_ptr, flags, cydevice, cyvdpDevice, cyvdpGetProcAddress) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pCtx) + return (CUresult(err), None) + return (CUresult(err), pCtx) {{endif}} {{if True}} @@ -54629,8 +56100,8 @@ def cuGraphicsVDPAURegisterVideoSurface(vdpSurface, unsigned int flags): with nogil: err = cydriver.cuGraphicsVDPAURegisterVideoSurface(pCudaResource._pvt_ptr, cyvdpSurface, flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pCudaResource) + return (CUresult(err), None) + return (CUresult(err), pCudaResource) {{endif}} {{if True}} @@ -54692,8 +56163,8 @@ def cuGraphicsVDPAURegisterOutputSurface(vdpSurface, unsigned int flags): with nogil: err = cydriver.cuGraphicsVDPAURegisterOutputSurface(pCudaResource._pvt_ptr, cyvdpSurface, flags) if err != cydriver.CUDA_SUCCESS: - return (_dict_CUresult[err], None) - return (_dict_CUresult[err], pCudaResource) + return (CUresult(err), None) + return (CUresult(err), pCudaResource) {{endif}} diff --git a/cuda_bindings/cuda/bindings/nvfatbin.pyx b/cuda_bindings/cuda/bindings/nvfatbin.pyx index 37dc8de98b..71c53f2d3c 100644 --- a/cuda_bindings/cuda/bindings/nvfatbin.pyx +++ b/cuda_bindings/cuda/bindings/nvfatbin.pyx @@ -9,7 +9,7 @@ cimport cython # NOQA from ._internal.utils cimport (get_resource_ptr, get_nested_resource_ptr, nested_resource, nullable_unique_ptr, get_buffer_pointer, get_resource_ptrs) -from enum import IntEnum as _IntEnum +from cuda.bindings._internal._fast_enum import FastEnum as _IntEnum from libcpp.vector cimport vector @@ -18,7 +18,12 @@ from libcpp.vector cimport vector ############################################################################### class Result(_IntEnum): - """See `nvFatbinResult`.""" + """ + The enumerated type nvFatbinResult defines API call result codes. + nvFatbin APIs return nvFatbinResult codes to indicate the result. + + See `nvFatbinResult`. + """ SUCCESS = NVFATBIN_SUCCESS ERROR_INTERNAL = NVFATBIN_ERROR_INTERNAL ERROR_ELF_ARCH_MISMATCH = NVFATBIN_ERROR_ELF_ARCH_MISMATCH diff --git a/cuda_bindings/cuda/bindings/nvjitlink.pyx b/cuda_bindings/cuda/bindings/nvjitlink.pyx index a8d61e4796..874ee55ce7 100644 --- a/cuda_bindings/cuda/bindings/nvjitlink.pyx +++ b/cuda_bindings/cuda/bindings/nvjitlink.pyx @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # @@ -9,7 +9,7 @@ cimport cython # NOQA from ._internal.utils cimport (get_resource_ptr, get_nested_resource_ptr, nested_resource, nullable_unique_ptr, get_buffer_pointer, get_resource_ptrs) -from enum import IntEnum as _IntEnum +from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum from libcpp.vector cimport vector @@ -17,39 +17,49 @@ from libcpp.vector cimport vector # Enum ############################################################################### -class Result(_IntEnum): - """See `nvJitLinkResult`.""" +class Result(_FastEnum): + """ + The enumerated type nvJitLinkResult defines API call result codes. + nvJitLink APIs return nvJitLinkResult codes to indicate the result. + + See `nvJitLinkResult`. + """ SUCCESS = NVJITLINK_SUCCESS - ERROR_UNRECOGNIZED_OPTION = NVJITLINK_ERROR_UNRECOGNIZED_OPTION - ERROR_MISSING_ARCH = NVJITLINK_ERROR_MISSING_ARCH - ERROR_INVALID_INPUT = NVJITLINK_ERROR_INVALID_INPUT - ERROR_PTX_COMPILE = NVJITLINK_ERROR_PTX_COMPILE - ERROR_NVVM_COMPILE = NVJITLINK_ERROR_NVVM_COMPILE - ERROR_INTERNAL = NVJITLINK_ERROR_INTERNAL - ERROR_THREADPOOL = NVJITLINK_ERROR_THREADPOOL - ERROR_UNRECOGNIZED_INPUT = NVJITLINK_ERROR_UNRECOGNIZED_INPUT - ERROR_FINALIZE = NVJITLINK_ERROR_FINALIZE - ERROR_NULL_INPUT = NVJITLINK_ERROR_NULL_INPUT - ERROR_INCOMPATIBLE_OPTIONS = NVJITLINK_ERROR_INCOMPATIBLE_OPTIONS - ERROR_INCORRECT_INPUT_TYPE = NVJITLINK_ERROR_INCORRECT_INPUT_TYPE - ERROR_ARCH_MISMATCH = NVJITLINK_ERROR_ARCH_MISMATCH - ERROR_OUTDATED_LIBRARY = NVJITLINK_ERROR_OUTDATED_LIBRARY - ERROR_MISSING_FATBIN = NVJITLINK_ERROR_MISSING_FATBIN - ERROR_UNRECOGNIZED_ARCH = NVJITLINK_ERROR_UNRECOGNIZED_ARCH - ERROR_UNSUPPORTED_ARCH = NVJITLINK_ERROR_UNSUPPORTED_ARCH - ERROR_LTO_NOT_ENABLED = NVJITLINK_ERROR_LTO_NOT_ENABLED - -class InputType(_IntEnum): - """See `nvJitLinkInputType`.""" - NONE = NVJITLINK_INPUT_NONE - CUBIN = NVJITLINK_INPUT_CUBIN - PTX = NVJITLINK_INPUT_PTX - LTOIR = NVJITLINK_INPUT_LTOIR - FATBIN = NVJITLINK_INPUT_FATBIN - OBJECT = NVJITLINK_INPUT_OBJECT - LIBRARY = NVJITLINK_INPUT_LIBRARY - INDEX = NVJITLINK_INPUT_INDEX - ANY = NVJITLINK_INPUT_ANY + ERROR_UNRECOGNIZED_OPTION = (NVJITLINK_ERROR_UNRECOGNIZED_OPTION, 'Unrecognized Option') + ERROR_MISSING_ARCH = (NVJITLINK_ERROR_MISSING_ARCH, 'Option `-arch=sm_NN` not specified') + ERROR_INVALID_INPUT = (NVJITLINK_ERROR_INVALID_INPUT, 'Invalid Input') + ERROR_PTX_COMPILE = (NVJITLINK_ERROR_PTX_COMPILE, 'Issue during PTX Compilation') + ERROR_NVVM_COMPILE = (NVJITLINK_ERROR_NVVM_COMPILE, 'Issue during NVVM Compilation') + ERROR_INTERNAL = (NVJITLINK_ERROR_INTERNAL, 'Internal Error') + ERROR_THREADPOOL = (NVJITLINK_ERROR_THREADPOOL, 'Issue with Thread Pool') + ERROR_UNRECOGNIZED_INPUT = (NVJITLINK_ERROR_UNRECOGNIZED_INPUT, 'Unrecognized Input') + ERROR_FINALIZE = (NVJITLINK_ERROR_FINALIZE, 'Finalizer Error') + ERROR_NULL_INPUT = (NVJITLINK_ERROR_NULL_INPUT, 'Null Input') + ERROR_INCOMPATIBLE_OPTIONS = (NVJITLINK_ERROR_INCOMPATIBLE_OPTIONS, 'Incompatible Options') + ERROR_INCORRECT_INPUT_TYPE = (NVJITLINK_ERROR_INCORRECT_INPUT_TYPE, 'Incorrect Input Type') + ERROR_ARCH_MISMATCH = (NVJITLINK_ERROR_ARCH_MISMATCH, 'Arch Mismatch') + ERROR_OUTDATED_LIBRARY = (NVJITLINK_ERROR_OUTDATED_LIBRARY, 'Outdated Library') + ERROR_MISSING_FATBIN = (NVJITLINK_ERROR_MISSING_FATBIN, 'Missing Fatbin') + ERROR_UNRECOGNIZED_ARCH = (NVJITLINK_ERROR_UNRECOGNIZED_ARCH, 'Unrecognized -arch value') + ERROR_UNSUPPORTED_ARCH = (NVJITLINK_ERROR_UNSUPPORTED_ARCH, 'Unsupported -arch value') + ERROR_LTO_NOT_ENABLED = (NVJITLINK_ERROR_LTO_NOT_ENABLED, 'Requires -lto') + +class InputType(_FastEnum): + """ + The enumerated type nvJitLinkInputType defines the kind of inputs that + can be passed to nvJitLinkAdd* APIs. + + See `nvJitLinkInputType`. + """ + NONE = (NVJITLINK_INPUT_NONE, 'Error Type') + CUBIN = (NVJITLINK_INPUT_CUBIN, 'For CUDA Binaries') + PTX = (NVJITLINK_INPUT_PTX, 'For PTX') + LTOIR = (NVJITLINK_INPUT_LTOIR, 'For LTO-IR') + FATBIN = (NVJITLINK_INPUT_FATBIN, 'For Fatbin') + OBJECT = (NVJITLINK_INPUT_OBJECT, 'For Host Object') + LIBRARY = (NVJITLINK_INPUT_LIBRARY, 'For Host Library') + INDEX = (NVJITLINK_INPUT_INDEX, 'For Index File') + ANY = (NVJITLINK_INPUT_ANY, 'Dynamically chooses from the valid types') ############################################################################### diff --git a/cuda_bindings/cuda/bindings/nvml.pyx b/cuda_bindings/cuda/bindings/nvml.pyx index 1a75193b2c..5513b61967 100644 --- a/cuda_bindings/cuda/bindings/nvml.pyx +++ b/cuda_bindings/cuda/bindings/nvml.pyx @@ -9,7 +9,7 @@ cimport cython # NOQA from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, nested_resource) -from enum import IntEnum as _IntEnum +from cuda.bindings._internal._fast_enum import FastEnum as _FastEnum from cuda.bindings.cydriver cimport CUDA_VERSION @@ -45,21 +45,36 @@ cdef inline unsigned int NVML_VERSION_STRUCT(const unsigned int size, const unsi # Enum ############################################################################### -class BridgeChipType(_IntEnum): - """See `nvmlBridgeChipType_t`.""" +class BridgeChipType(_FastEnum): + """ + Enum to represent type of bridge chip + + See `nvmlBridgeChipType_t`. + """ BRIDGE_CHIP_PLX = NVML_BRIDGE_CHIP_PLX BRIDGE_CHIP_BRO4 = NVML_BRIDGE_CHIP_BRO4 -class NvLinkUtilizationCountUnits(_IntEnum): - """See `nvmlNvLinkUtilizationCountUnits_t`.""" +class NvLinkUtilizationCountUnits(_FastEnum): + """ + Enum to represent the NvLink utilization counter packet units + + See `nvmlNvLinkUtilizationCountUnits_t`. + """ NVLINK_COUNTER_UNIT_CYCLES = NVML_NVLINK_COUNTER_UNIT_CYCLES NVLINK_COUNTER_UNIT_PACKETS = NVML_NVLINK_COUNTER_UNIT_PACKETS NVLINK_COUNTER_UNIT_BYTES = NVML_NVLINK_COUNTER_UNIT_BYTES NVLINK_COUNTER_UNIT_RESERVED = NVML_NVLINK_COUNTER_UNIT_RESERVED NVLINK_COUNTER_UNIT_COUNT = NVML_NVLINK_COUNTER_UNIT_COUNT -class NvLinkUtilizationCountPktTypes(_IntEnum): - """See `nvmlNvLinkUtilizationCountPktTypes_t`.""" +class NvLinkUtilizationCountPktTypes(_FastEnum): + """ + Enum to represent the NvLink utilization counter packet types to count + ** this is ONLY applicable with the units as packets or bytes ** as + specified in `nvmlNvLinkUtilizationCountUnits_t` ** all packet filter + descriptions are target GPU centric ** these can be "OR'd" together + + See `nvmlNvLinkUtilizationCountPktTypes_t`. + """ NVLINK_COUNTER_PKTFILTER_NOP = NVML_NVLINK_COUNTER_PKTFILTER_NOP NVLINK_COUNTER_PKTFILTER_READ = NVML_NVLINK_COUNTER_PKTFILTER_READ NVLINK_COUNTER_PKTFILTER_WRITE = NVML_NVLINK_COUNTER_PKTFILTER_WRITE @@ -70,8 +85,12 @@ class NvLinkUtilizationCountPktTypes(_IntEnum): NVLINK_COUNTER_PKTFILTER_RESPNODATA = NVML_NVLINK_COUNTER_PKTFILTER_RESPNODATA NVLINK_COUNTER_PKTFILTER_ALL = NVML_NVLINK_COUNTER_PKTFILTER_ALL -class NvLinkCapability(_IntEnum): - """See `nvmlNvLinkCapability_t`.""" +class NvLinkCapability(_FastEnum): + """ + Enum to represent NvLink queryable capabilities + + See `nvmlNvLinkCapability_t`. + """ NVLINK_CAP_P2P_SUPPORTED = NVML_NVLINK_CAP_P2P_SUPPORTED NVLINK_CAP_SYSMEM_ACCESS = NVML_NVLINK_CAP_SYSMEM_ACCESS NVLINK_CAP_P2P_ATOMICS = NVML_NVLINK_CAP_P2P_ATOMICS @@ -80,8 +99,12 @@ class NvLinkCapability(_IntEnum): NVLINK_CAP_VALID = NVML_NVLINK_CAP_VALID NVLINK_CAP_COUNT = NVML_NVLINK_CAP_COUNT -class NvLinkErrorCounter(_IntEnum): - """See `nvmlNvLinkErrorCounter_t`.""" +class NvLinkErrorCounter(_FastEnum): + """ + Enum to represent NvLink queryable error counters + + See `nvmlNvLinkErrorCounter_t`. + """ NVLINK_ERROR_DL_REPLAY = NVML_NVLINK_ERROR_DL_REPLAY NVLINK_ERROR_DL_RECOVERY = NVML_NVLINK_ERROR_DL_RECOVERY NVLINK_ERROR_DL_CRC_FLIT = NVML_NVLINK_ERROR_DL_CRC_FLIT @@ -89,15 +112,24 @@ class NvLinkErrorCounter(_IntEnum): NVLINK_ERROR_DL_ECC_DATA = NVML_NVLINK_ERROR_DL_ECC_DATA NVLINK_ERROR_COUNT = NVML_NVLINK_ERROR_COUNT -class IntNvLinkDeviceType(_IntEnum): - """See `nvmlIntNvLinkDeviceType_t`.""" +class IntNvLinkDeviceType(_FastEnum): + """ + Enum to represent NvLink's remote device type + + See `nvmlIntNvLinkDeviceType_t`. + """ NVLINK_DEVICE_TYPE_GPU = NVML_NVLINK_DEVICE_TYPE_GPU NVLINK_DEVICE_TYPE_IBMNPU = NVML_NVLINK_DEVICE_TYPE_IBMNPU NVLINK_DEVICE_TYPE_SWITCH = NVML_NVLINK_DEVICE_TYPE_SWITCH NVLINK_DEVICE_TYPE_UNKNOWN = NVML_NVLINK_DEVICE_TYPE_UNKNOWN -class GpuTopologyLevel(_IntEnum): - """See `nvmlGpuTopologyLevel_t`.""" +class GpuTopologyLevel(_FastEnum): + """ + Represents level relationships within a system between two GPUs The + enums are spaced to allow for future relationships + + See `nvmlGpuTopologyLevel_t`. + """ TOPOLOGY_INTERNAL = NVML_TOPOLOGY_INTERNAL TOPOLOGY_SINGLE = NVML_TOPOLOGY_SINGLE TOPOLOGY_MULTIPLE = NVML_TOPOLOGY_MULTIPLE @@ -105,8 +137,10 @@ class GpuTopologyLevel(_IntEnum): TOPOLOGY_NODE = NVML_TOPOLOGY_NODE TOPOLOGY_SYSTEM = NVML_TOPOLOGY_SYSTEM -class GpuP2PStatus(_IntEnum): - """See `nvmlGpuP2PStatus_t`.""" +class GpuP2PStatus(_FastEnum): + """ + See `nvmlGpuP2PStatus_t`. + """ P2P_STATUS_OK = NVML_P2P_STATUS_OK P2P_STATUS_CHIPSET_NOT_SUPPORED = NVML_P2P_STATUS_CHIPSET_NOT_SUPPORED P2P_STATUS_CHIPSET_NOT_SUPPORTED = NVML_P2P_STATUS_CHIPSET_NOT_SUPPORTED @@ -116,8 +150,10 @@ class GpuP2PStatus(_IntEnum): P2P_STATUS_NOT_SUPPORTED = NVML_P2P_STATUS_NOT_SUPPORTED P2P_STATUS_UNKNOWN = NVML_P2P_STATUS_UNKNOWN -class GpuP2PCapsIndex(_IntEnum): - """See `nvmlGpuP2PCapsIndex_t`.""" +class GpuP2PCapsIndex(_FastEnum): + """ + See `nvmlGpuP2PCapsIndex_t`. + """ P2P_CAPS_INDEX_READ = NVML_P2P_CAPS_INDEX_READ P2P_CAPS_INDEX_WRITE = NVML_P2P_CAPS_INDEX_WRITE P2P_CAPS_INDEX_NVLINK = NVML_P2P_CAPS_INDEX_NVLINK @@ -126,28 +162,40 @@ class GpuP2PCapsIndex(_IntEnum): P2P_CAPS_INDEX_PROP = NVML_P2P_CAPS_INDEX_PROP P2P_CAPS_INDEX_UNKNOWN = NVML_P2P_CAPS_INDEX_UNKNOWN -class SamplingType(_IntEnum): - """See `nvmlSamplingType_t`.""" - TOTAL_POWER_SAMPLES = NVML_TOTAL_POWER_SAMPLES - GPU_UTILIZATION_SAMPLES = NVML_GPU_UTILIZATION_SAMPLES - MEMORY_UTILIZATION_SAMPLES = NVML_MEMORY_UTILIZATION_SAMPLES - ENC_UTILIZATION_SAMPLES = NVML_ENC_UTILIZATION_SAMPLES - DEC_UTILIZATION_SAMPLES = NVML_DEC_UTILIZATION_SAMPLES - PROCESSOR_CLK_SAMPLES = NVML_PROCESSOR_CLK_SAMPLES - MEMORY_CLK_SAMPLES = NVML_MEMORY_CLK_SAMPLES - MODULE_POWER_SAMPLES = NVML_MODULE_POWER_SAMPLES - JPG_UTILIZATION_SAMPLES = NVML_JPG_UTILIZATION_SAMPLES - OFA_UTILIZATION_SAMPLES = NVML_OFA_UTILIZATION_SAMPLES +class SamplingType(_FastEnum): + """ + Represents Type of Sampling Event + + See `nvmlSamplingType_t`. + """ + TOTAL_POWER_SAMPLES = (NVML_TOTAL_POWER_SAMPLES, 'To represent total power drawn by GPU.') + GPU_UTILIZATION_SAMPLES = (NVML_GPU_UTILIZATION_SAMPLES, 'To represent percent of time during which one or more kernels was executing on the GPU.') + MEMORY_UTILIZATION_SAMPLES = (NVML_MEMORY_UTILIZATION_SAMPLES, 'To represent percent of time during which global (device) memory was being read or written.') + ENC_UTILIZATION_SAMPLES = (NVML_ENC_UTILIZATION_SAMPLES, 'To represent percent of time during which NVENC remains busy.') + DEC_UTILIZATION_SAMPLES = (NVML_DEC_UTILIZATION_SAMPLES, 'To represent percent of time during which NVDEC remains busy.') + PROCESSOR_CLK_SAMPLES = (NVML_PROCESSOR_CLK_SAMPLES, 'To represent processor clock samples.') + MEMORY_CLK_SAMPLES = (NVML_MEMORY_CLK_SAMPLES, 'To represent memory clock samples.') + MODULE_POWER_SAMPLES = (NVML_MODULE_POWER_SAMPLES, 'To represent module power samples for total module starting Grace Hopper.') + JPG_UTILIZATION_SAMPLES = (NVML_JPG_UTILIZATION_SAMPLES, 'To represent percent of time during which NVJPG remains busy.') + OFA_UTILIZATION_SAMPLES = (NVML_OFA_UTILIZATION_SAMPLES, 'To represent percent of time during which NVOFA remains busy.') SAMPLINGTYPE_COUNT = NVML_SAMPLINGTYPE_COUNT -class PcieUtilCounter(_IntEnum): - """See `nvmlPcieUtilCounter_t`.""" +class PcieUtilCounter(_FastEnum): + """ + Represents the queryable PCIe utilization counters + + See `nvmlPcieUtilCounter_t`. + """ PCIE_UTIL_TX_BYTES = NVML_PCIE_UTIL_TX_BYTES PCIE_UTIL_RX_BYTES = NVML_PCIE_UTIL_RX_BYTES PCIE_UTIL_COUNT = NVML_PCIE_UTIL_COUNT -class ValueType(_IntEnum): - """See `nvmlValueType_t`.""" +class ValueType(_FastEnum): + """ + Represents the type for sample value returned + + See `nvmlValueType_t`. + """ DOUBLE = NVML_VALUE_TYPE_DOUBLE UNSIGNED_INT = NVML_VALUE_TYPE_UNSIGNED_INT UNSIGNED_LONG = NVML_VALUE_TYPE_UNSIGNED_LONG @@ -157,33 +205,45 @@ class ValueType(_IntEnum): UNSIGNED_SHORT = NVML_VALUE_TYPE_UNSIGNED_SHORT COUNT = NVML_VALUE_TYPE_COUNT -class PerfPolicyType(_IntEnum): - """See `nvmlPerfPolicyType_t`.""" - PERF_POLICY_POWER = NVML_PERF_POLICY_POWER - PERF_POLICY_THERMAL = NVML_PERF_POLICY_THERMAL - PERF_POLICY_SYNC_BOOST = NVML_PERF_POLICY_SYNC_BOOST - PERF_POLICY_BOARD_LIMIT = NVML_PERF_POLICY_BOARD_LIMIT - PERF_POLICY_LOW_UTILIZATION = NVML_PERF_POLICY_LOW_UTILIZATION - PERF_POLICY_RELIABILITY = NVML_PERF_POLICY_RELIABILITY - PERF_POLICY_TOTAL_APP_CLOCKS = NVML_PERF_POLICY_TOTAL_APP_CLOCKS - PERF_POLICY_TOTAL_BASE_CLOCKS = NVML_PERF_POLICY_TOTAL_BASE_CLOCKS +class PerfPolicyType(_FastEnum): + """ + Represents type of perf policy for which violation times can be queried + + See `nvmlPerfPolicyType_t`. + """ + PERF_POLICY_POWER = (NVML_PERF_POLICY_POWER, 'How long did power violations cause the GPU to be below application clocks.') + PERF_POLICY_THERMAL = (NVML_PERF_POLICY_THERMAL, 'How long did thermal violations cause the GPU to be below application clocks.') + PERF_POLICY_SYNC_BOOST = (NVML_PERF_POLICY_SYNC_BOOST, 'How long did sync boost cause the GPU to be below application clocks.') + PERF_POLICY_BOARD_LIMIT = (NVML_PERF_POLICY_BOARD_LIMIT, 'How long did the board limit cause the GPU to be below application clocks.') + PERF_POLICY_LOW_UTILIZATION = (NVML_PERF_POLICY_LOW_UTILIZATION, 'How long did low utilization cause the GPU to be below application clocks.') + PERF_POLICY_RELIABILITY = (NVML_PERF_POLICY_RELIABILITY, 'How long did the board reliability limit cause the GPU to be below application clocks.') + PERF_POLICY_TOTAL_APP_CLOCKS = (NVML_PERF_POLICY_TOTAL_APP_CLOCKS, 'Total time the GPU was held below application clocks by any limiter (0 - 5 above)') + PERF_POLICY_TOTAL_BASE_CLOCKS = (NVML_PERF_POLICY_TOTAL_BASE_CLOCKS, 'Total time the GPU was held below base clocks.') PERF_POLICY_COUNT = NVML_PERF_POLICY_COUNT -class ThermalTarget(_IntEnum): - """See `nvmlThermalTarget_t`.""" +class ThermalTarget(_FastEnum): + """ + Represents the thermal sensor targets + + See `nvmlThermalTarget_t`. + """ NONE = NVML_THERMAL_TARGET_NONE - GPU = NVML_THERMAL_TARGET_GPU - MEMORY = NVML_THERMAL_TARGET_MEMORY - POWER_SUPPLY = NVML_THERMAL_TARGET_POWER_SUPPLY - BOARD = NVML_THERMAL_TARGET_BOARD - VCD_BOARD = NVML_THERMAL_TARGET_VCD_BOARD - VCD_INLET = NVML_THERMAL_TARGET_VCD_INLET - VCD_OUTLET = NVML_THERMAL_TARGET_VCD_OUTLET + GPU = (NVML_THERMAL_TARGET_GPU, 'GPU core temperature requires NvPhysicalGpuHandle.') + MEMORY = (NVML_THERMAL_TARGET_MEMORY, 'GPU memory temperature requires NvPhysicalGpuHandle.') + POWER_SUPPLY = (NVML_THERMAL_TARGET_POWER_SUPPLY, 'GPU power supply temperature requires NvPhysicalGpuHandle.') + BOARD = (NVML_THERMAL_TARGET_BOARD, 'GPU board ambient temperature requires NvPhysicalGpuHandle.') + VCD_BOARD = (NVML_THERMAL_TARGET_VCD_BOARD, 'Visual Computing Device Board temperature requires NvVisualComputingDeviceHandle.') + VCD_INLET = (NVML_THERMAL_TARGET_VCD_INLET, 'Visual Computing Device Inlet temperature requires NvVisualComputingDeviceHandle.') + VCD_OUTLET = (NVML_THERMAL_TARGET_VCD_OUTLET, 'Visual Computing Device Outlet temperature requires NvVisualComputingDeviceHandle.') ALL = NVML_THERMAL_TARGET_ALL UNKNOWN = NVML_THERMAL_TARGET_UNKNOWN -class ThermalController(_IntEnum): - """See `nvmlThermalController_t`.""" +class ThermalController(_FastEnum): + """ + Represents the thermal sensor controllers + + See `nvmlThermalController_t`. + """ NONE = NVML_THERMAL_CONTROLLER_NONE GPU_INTERNAL = NVML_THERMAL_CONTROLLER_GPU_INTERNAL ADM1032 = NVML_THERMAL_CONTROLLER_ADM1032 @@ -204,34 +264,54 @@ class ThermalController(_IntEnum): ADT7473S = NVML_THERMAL_CONTROLLER_ADT7473S UNKNOWN = NVML_THERMAL_CONTROLLER_UNKNOWN -class CoolerControl(_IntEnum): - """See `nvmlCoolerControl_t`.""" - THERMAL_COOLER_SIGNAL_NONE = NVML_THERMAL_COOLER_SIGNAL_NONE - THERMAL_COOLER_SIGNAL_TOGGLE = NVML_THERMAL_COOLER_SIGNAL_TOGGLE - THERMAL_COOLER_SIGNAL_VARIABLE = NVML_THERMAL_COOLER_SIGNAL_VARIABLE +class CoolerControl(_FastEnum): + """ + Cooler control type + + See `nvmlCoolerControl_t`. + """ + THERMAL_COOLER_SIGNAL_NONE = (NVML_THERMAL_COOLER_SIGNAL_NONE, 'This cooler has no control signal.') + THERMAL_COOLER_SIGNAL_TOGGLE = (NVML_THERMAL_COOLER_SIGNAL_TOGGLE, 'This cooler can only be toggled either ON or OFF (eg a switch).') + THERMAL_COOLER_SIGNAL_VARIABLE = (NVML_THERMAL_COOLER_SIGNAL_VARIABLE, "This cooler's level can be adjusted from some minimum to some maximum (eg a knob).") THERMAL_COOLER_SIGNAL_COUNT = NVML_THERMAL_COOLER_SIGNAL_COUNT -class CoolerTarget(_IntEnum): - """See `nvmlCoolerTarget_t`.""" - THERMAL_NONE = NVML_THERMAL_COOLER_TARGET_NONE - THERMAL_GPU = NVML_THERMAL_COOLER_TARGET_GPU - THERMAL_MEMORY = NVML_THERMAL_COOLER_TARGET_MEMORY - THERMAL_POWER_SUPPLY = NVML_THERMAL_COOLER_TARGET_POWER_SUPPLY - THERMAL_GPU_RELATED = NVML_THERMAL_COOLER_TARGET_GPU_RELATED - -class UUIDType(_IntEnum): - """See `nvmlUUIDType_t`.""" - NONE = NVML_UUID_TYPE_NONE - ASCII = NVML_UUID_TYPE_ASCII - BINARY = NVML_UUID_TYPE_BINARY - -class EnableState(_IntEnum): - """See `nvmlEnableState_t`.""" - FEATURE_DISABLED = NVML_FEATURE_DISABLED - FEATURE_ENABLED = NVML_FEATURE_ENABLED - -class BrandType(_IntEnum): - """See `nvmlBrandType_t`.""" +class CoolerTarget(_FastEnum): + """ + Cooler's target + + See `nvmlCoolerTarget_t`. + """ + THERMAL_NONE = (NVML_THERMAL_COOLER_TARGET_NONE, 'This cooler cools nothing.') + THERMAL_GPU = (NVML_THERMAL_COOLER_TARGET_GPU, 'This cooler can cool the GPU.') + THERMAL_MEMORY = (NVML_THERMAL_COOLER_TARGET_MEMORY, 'This cooler can cool the memory.') + THERMAL_POWER_SUPPLY = (NVML_THERMAL_COOLER_TARGET_POWER_SUPPLY, 'This cooler can cool the power supply.') + THERMAL_GPU_RELATED = (NVML_THERMAL_COOLER_TARGET_GPU_RELATED, 'This cooler cools all of the components related to its target gpu. GPU_RELATED = GPU | MEMORY | POWER_SUPPLY.') + +class UUIDType(_FastEnum): + """ + Enum to represent different UUID types + + See `nvmlUUIDType_t`. + """ + NONE = (NVML_UUID_TYPE_NONE, 'Undefined type.') + ASCII = (NVML_UUID_TYPE_ASCII, 'ASCII format type.') + BINARY = (NVML_UUID_TYPE_BINARY, 'Binary format type.') + +class EnableState(_FastEnum): + """ + Generic enable/disable enum. + + See `nvmlEnableState_t`. + """ + FEATURE_DISABLED = (NVML_FEATURE_DISABLED, 'Feature disabled.') + FEATURE_ENABLED = (NVML_FEATURE_ENABLED, 'Feature enabled.') + +class BrandType(_FastEnum): + """ + - The Brand of the GPU + + See `nvmlBrandType_t`. + """ BRAND_UNKNOWN = NVML_BRAND_UNKNOWN BRAND_QUADRO = NVML_BRAND_QUADRO BRAND_TESLA = NVML_BRAND_TESLA @@ -252,8 +332,12 @@ class BrandType(_IntEnum): BRAND_TITAN_RTX = NVML_BRAND_TITAN_RTX BRAND_COUNT = NVML_BRAND_COUNT -class TemperatureThresholds(_IntEnum): - """See `nvmlTemperatureThresholds_t`.""" +class TemperatureThresholds(_FastEnum): + """ + Temperature thresholds. + + See `nvmlTemperatureThresholds_t`. + """ TEMPERATURE_THRESHOLD_SHUTDOWN = NVML_TEMPERATURE_THRESHOLD_SHUTDOWN TEMPERATURE_THRESHOLD_SLOWDOWN = NVML_TEMPERATURE_THRESHOLD_SLOWDOWN TEMPERATURE_THRESHOLD_MEM_MAX = NVML_TEMPERATURE_THRESHOLD_MEM_MAX @@ -264,365 +348,514 @@ class TemperatureThresholds(_IntEnum): TEMPERATURE_THRESHOLD_GPS_CURR = NVML_TEMPERATURE_THRESHOLD_GPS_CURR TEMPERATURE_THRESHOLD_COUNT = NVML_TEMPERATURE_THRESHOLD_COUNT -class TemperatureSensors(_IntEnum): - """See `nvmlTemperatureSensors_t`.""" - TEMPERATURE_GPU = NVML_TEMPERATURE_GPU +class TemperatureSensors(_FastEnum): + """ + Temperature sensors. + + See `nvmlTemperatureSensors_t`. + """ + TEMPERATURE_GPU = (NVML_TEMPERATURE_GPU, 'Temperature sensor for the GPU die.') TEMPERATURE_COUNT = NVML_TEMPERATURE_COUNT -class ComputeMode(_IntEnum): - """See `nvmlComputeMode_t`.""" - COMPUTEMODE_DEFAULT = NVML_COMPUTEMODE_DEFAULT - COMPUTEMODE_EXCLUSIVE_THREAD = NVML_COMPUTEMODE_EXCLUSIVE_THREAD - COMPUTEMODE_PROHIBITED = NVML_COMPUTEMODE_PROHIBITED - COMPUTEMODE_EXCLUSIVE_PROCESS = NVML_COMPUTEMODE_EXCLUSIVE_PROCESS +class ComputeMode(_FastEnum): + """ + Compute mode. NVML_COMPUTEMODE_EXCLUSIVE_PROCESS was added in CUDA + 4.0. Earlier CUDA versions supported a single exclusive mode, which is + equivalent to NVML_COMPUTEMODE_EXCLUSIVE_THREAD in CUDA 4.0 and beyond. + + See `nvmlComputeMode_t`. + """ + COMPUTEMODE_DEFAULT = (NVML_COMPUTEMODE_DEFAULT, 'Default compute mode -- multiple contexts per device.') + COMPUTEMODE_EXCLUSIVE_THREAD = (NVML_COMPUTEMODE_EXCLUSIVE_THREAD, 'Support Removed.') + COMPUTEMODE_PROHIBITED = (NVML_COMPUTEMODE_PROHIBITED, 'Compute-prohibited mode -- no contexts per device.') + COMPUTEMODE_EXCLUSIVE_PROCESS = (NVML_COMPUTEMODE_EXCLUSIVE_PROCESS, 'Compute-exclusive-process mode -- only one context per device, usable from multiple threads at a time.') COMPUTEMODE_COUNT = NVML_COMPUTEMODE_COUNT -class MemoryErrorType(_IntEnum): - """See `nvmlMemoryErrorType_t`.""" - CORRECTED = NVML_MEMORY_ERROR_TYPE_CORRECTED - UNCORRECTED = NVML_MEMORY_ERROR_TYPE_UNCORRECTED - COUNT = NVML_MEMORY_ERROR_TYPE_COUNT - -class NvlinkVersion(_IntEnum): - """See `nvmlNvlinkVersion_t`.""" - VERSION_INVALID = NVML_NVLINK_VERSION_INVALID - VERSION_1_0 = NVML_NVLINK_VERSION_1_0 - VERSION_2_0 = NVML_NVLINK_VERSION_2_0 - VERSION_2_2 = NVML_NVLINK_VERSION_2_2 - VERSION_3_0 = NVML_NVLINK_VERSION_3_0 - VERSION_3_1 = NVML_NVLINK_VERSION_3_1 - VERSION_4_0 = NVML_NVLINK_VERSION_4_0 - VERSION_5_0 = NVML_NVLINK_VERSION_5_0 - -class EccCounterType(_IntEnum): - """See `nvmlEccCounterType_t`.""" - VOLATILE_ECC = NVML_VOLATILE_ECC - AGGREGATE_ECC = NVML_AGGREGATE_ECC - COUNT = NVML_ECC_COUNTER_TYPE_COUNT - -class ClockType(_IntEnum): - """See `nvmlClockType_t`.""" - CLOCK_GRAPHICS = NVML_CLOCK_GRAPHICS - CLOCK_SM = NVML_CLOCK_SM - CLOCK_MEM = NVML_CLOCK_MEM - CLOCK_VIDEO = NVML_CLOCK_VIDEO - CLOCK_COUNT = NVML_CLOCK_COUNT - -class ClockId(_IntEnum): - """See `nvmlClockId_t`.""" - CURRENT = NVML_CLOCK_ID_CURRENT - APP_CLOCK_TARGET = NVML_CLOCK_ID_APP_CLOCK_TARGET - APP_CLOCK_DEFAULT = NVML_CLOCK_ID_APP_CLOCK_DEFAULT - CUSTOMER_BOOST_MAX = NVML_CLOCK_ID_CUSTOMER_BOOST_MAX - COUNT = NVML_CLOCK_ID_COUNT - -class DriverModel(_IntEnum): - """See `nvmlDriverModel_t`.""" - DRIVER_WDDM = NVML_DRIVER_WDDM - DRIVER_WDM = NVML_DRIVER_WDM - DRIVER_MCDM = NVML_DRIVER_MCDM - -class Pstates(_IntEnum): - """See `nvmlPstates_t`.""" - PSTATE_0 = NVML_PSTATE_0 - PSTATE_1 = NVML_PSTATE_1 - PSTATE_2 = NVML_PSTATE_2 - PSTATE_3 = NVML_PSTATE_3 - PSTATE_4 = NVML_PSTATE_4 - PSTATE_5 = NVML_PSTATE_5 - PSTATE_6 = NVML_PSTATE_6 - PSTATE_7 = NVML_PSTATE_7 - PSTATE_8 = NVML_PSTATE_8 - PSTATE_9 = NVML_PSTATE_9 - PSTATE_10 = NVML_PSTATE_10 - PSTATE_11 = NVML_PSTATE_11 - PSTATE_12 = NVML_PSTATE_12 - PSTATE_13 = NVML_PSTATE_13 - PSTATE_14 = NVML_PSTATE_14 - PSTATE_15 = NVML_PSTATE_15 - PSTATE_UNKNOWN = NVML_PSTATE_UNKNOWN - -class GpuOperationMode(_IntEnum): - """See `nvmlGpuOperationMode_t`.""" - GOM_ALL_ON = NVML_GOM_ALL_ON - GOM_COMPUTE = NVML_GOM_COMPUTE - GOM_LOW_DP = NVML_GOM_LOW_DP - -class InforomObject(_IntEnum): - """See `nvmlInforomObject_t`.""" - INFOROM_OEM = NVML_INFOROM_OEM - INFOROM_ECC = NVML_INFOROM_ECC - INFOROM_POWER = NVML_INFOROM_POWER - INFOROM_DEN = NVML_INFOROM_DEN - INFOROM_COUNT = NVML_INFOROM_COUNT - -class Return(_IntEnum): - """See `nvmlReturn_t`.""" - SUCCESS = NVML_SUCCESS - ERROR_UNINITIALIZED = NVML_ERROR_UNINITIALIZED - ERROR_INVALID_ARGUMENT = NVML_ERROR_INVALID_ARGUMENT - ERROR_NOT_SUPPORTED = NVML_ERROR_NOT_SUPPORTED - ERROR_NO_PERMISSION = NVML_ERROR_NO_PERMISSION - ERROR_ALREADY_INITIALIZED = NVML_ERROR_ALREADY_INITIALIZED - ERROR_NOT_FOUND = NVML_ERROR_NOT_FOUND - ERROR_INSUFFICIENT_SIZE = NVML_ERROR_INSUFFICIENT_SIZE - ERROR_INSUFFICIENT_POWER = NVML_ERROR_INSUFFICIENT_POWER - ERROR_DRIVER_NOT_LOADED = NVML_ERROR_DRIVER_NOT_LOADED - ERROR_TIMEOUT = NVML_ERROR_TIMEOUT - ERROR_IRQ_ISSUE = NVML_ERROR_IRQ_ISSUE - ERROR_LIBRARY_NOT_FOUND = NVML_ERROR_LIBRARY_NOT_FOUND - ERROR_FUNCTION_NOT_FOUND = NVML_ERROR_FUNCTION_NOT_FOUND - ERROR_CORRUPTED_INFOROM = NVML_ERROR_CORRUPTED_INFOROM - ERROR_GPU_IS_LOST = NVML_ERROR_GPU_IS_LOST - ERROR_RESET_REQUIRED = NVML_ERROR_RESET_REQUIRED - ERROR_OPERATING_SYSTEM = NVML_ERROR_OPERATING_SYSTEM - ERROR_LIB_RM_VERSION_MISMATCH = NVML_ERROR_LIB_RM_VERSION_MISMATCH - ERROR_IN_USE = NVML_ERROR_IN_USE - ERROR_MEMORY = NVML_ERROR_MEMORY - ERROR_NO_DATA = NVML_ERROR_NO_DATA - ERROR_VGPU_ECC_NOT_SUPPORTED = NVML_ERROR_VGPU_ECC_NOT_SUPPORTED - ERROR_INSUFFICIENT_RESOURCES = NVML_ERROR_INSUFFICIENT_RESOURCES - ERROR_FREQ_NOT_SUPPORTED = NVML_ERROR_FREQ_NOT_SUPPORTED - ERROR_ARGUMENT_VERSION_MISMATCH = NVML_ERROR_ARGUMENT_VERSION_MISMATCH - ERROR_DEPRECATED = NVML_ERROR_DEPRECATED - ERROR_NOT_READY = NVML_ERROR_NOT_READY - ERROR_GPU_NOT_FOUND = NVML_ERROR_GPU_NOT_FOUND - ERROR_INVALID_STATE = NVML_ERROR_INVALID_STATE - ERROR_RESET_TYPE_NOT_SUPPORTED = NVML_ERROR_RESET_TYPE_NOT_SUPPORTED - ERROR_UNKNOWN = NVML_ERROR_UNKNOWN - -class MemoryLocation(_IntEnum): - """See `nvmlMemoryLocation_t`.""" - L1_CACHE = NVML_MEMORY_LOCATION_L1_CACHE - L2_CACHE = NVML_MEMORY_LOCATION_L2_CACHE - DRAM = NVML_MEMORY_LOCATION_DRAM - DEVICE_MEMORY = NVML_MEMORY_LOCATION_DEVICE_MEMORY - REGISTER_FILE = NVML_MEMORY_LOCATION_REGISTER_FILE - TEXTURE_MEMORY = NVML_MEMORY_LOCATION_TEXTURE_MEMORY - TEXTURE_SHM = NVML_MEMORY_LOCATION_TEXTURE_SHM - CBU = NVML_MEMORY_LOCATION_CBU - SRAM = NVML_MEMORY_LOCATION_SRAM - COUNT = NVML_MEMORY_LOCATION_COUNT - -class PageRetirementCause(_IntEnum): - """See `nvmlPageRetirementCause_t`.""" - MULTIPLE_SINGLE_BIT_ECC_ERRORS = NVML_PAGE_RETIREMENT_CAUSE_MULTIPLE_SINGLE_BIT_ECC_ERRORS - DOUBLE_BIT_ECC_ERROR = NVML_PAGE_RETIREMENT_CAUSE_DOUBLE_BIT_ECC_ERROR +class MemoryErrorType(_FastEnum): + """ + Memory error types + + See `nvmlMemoryErrorType_t`. + """ + CORRECTED = (NVML_MEMORY_ERROR_TYPE_CORRECTED, 'A memory error that was corrected For ECC errors, these are single bit errors For Texture memory, these are errors fixed by resend') + UNCORRECTED = (NVML_MEMORY_ERROR_TYPE_UNCORRECTED, 'A memory error that was not corrected For ECC errors, these are double bit errors For Texture memory, these are errors where the resend fails') + COUNT = (NVML_MEMORY_ERROR_TYPE_COUNT, 'Count of memory error types.') + +class NvlinkVersion(_FastEnum): + """ + Represents Nvlink Version + + See `nvmlNvlinkVersion_t`. + """ + VERSION_INVALID = (NVML_NVLINK_VERSION_INVALID, 'NVLink version is invalid.') + VERSION_1_0 = (NVML_NVLINK_VERSION_1_0, 'NVLink Version 1.0.') + VERSION_2_0 = (NVML_NVLINK_VERSION_2_0, 'NVLink Version 2.0.') + VERSION_2_2 = (NVML_NVLINK_VERSION_2_2, 'NVLink Version 2.2.') + VERSION_3_0 = (NVML_NVLINK_VERSION_3_0, 'NVLink Version 3.0.') + VERSION_3_1 = (NVML_NVLINK_VERSION_3_1, 'NVLink Version 3.1.') + VERSION_4_0 = (NVML_NVLINK_VERSION_4_0, 'NVLink Version 4.0.') + VERSION_5_0 = (NVML_NVLINK_VERSION_5_0, 'NVLink Version 5.0.') + +class EccCounterType(_FastEnum): + """ + ECC counter types. Note: Volatile counts are reset each time the + driver loads. On Windows this is once per boot. On Linux this can be + more frequent. On Linux the driver unloads when no active clients + exist. If persistence mode is enabled or there is always a driver + client active (e.g. X11), then Linux also sees per-boot behavior. If + not, volatile counts are reset each time a compute app is run. + + See `nvmlEccCounterType_t`. + """ + VOLATILE_ECC = (NVML_VOLATILE_ECC, 'Volatile counts are reset each time the driver loads.') + AGGREGATE_ECC = (NVML_AGGREGATE_ECC, 'Aggregate counts persist across reboots (i.e. for the lifetime of the device)') + COUNT = (NVML_ECC_COUNTER_TYPE_COUNT, 'Count of memory counter types.') + +class ClockType(_FastEnum): + """ + Clock types. All speeds are in Mhz. + + See `nvmlClockType_t`. + """ + CLOCK_GRAPHICS = (NVML_CLOCK_GRAPHICS, 'Graphics clock domain.') + CLOCK_SM = (NVML_CLOCK_SM, 'SM clock domain.') + CLOCK_MEM = (NVML_CLOCK_MEM, 'Memory clock domain.') + CLOCK_VIDEO = (NVML_CLOCK_VIDEO, 'Video encoder/decoder clock domain.') + CLOCK_COUNT = (NVML_CLOCK_COUNT, 'Count of clock types.') + +class ClockId(_FastEnum): + """ + Clock Ids. These are used in combination with nvmlClockType_t to + specify a single clock value. + + See `nvmlClockId_t`. + """ + CURRENT = (NVML_CLOCK_ID_CURRENT, 'Current actual clock value.') + APP_CLOCK_TARGET = (NVML_CLOCK_ID_APP_CLOCK_TARGET, 'Target application clock. Deprecated, do not use.') + APP_CLOCK_DEFAULT = (NVML_CLOCK_ID_APP_CLOCK_DEFAULT, 'Default application clock target Deprecated, do not use.') + CUSTOMER_BOOST_MAX = (NVML_CLOCK_ID_CUSTOMER_BOOST_MAX, 'OEM-defined maximum clock rate.') + COUNT = (NVML_CLOCK_ID_COUNT, 'Count of Clock Ids.') + +class DriverModel(_FastEnum): + """ + Driver models. Windows only. + + See `nvmlDriverModel_t`. + """ + DRIVER_WDDM = (NVML_DRIVER_WDDM, 'WDDM driver model -- GPU treated as a display device.') + DRIVER_WDM = (NVML_DRIVER_WDM, 'WDM (TCC) model (deprecated) -- GPU treated as a generic compute device.') + DRIVER_MCDM = (NVML_DRIVER_MCDM, 'MCDM driver model -- GPU treated as a Microsoft compute device.') + +class Pstates(_FastEnum): + """ + Allowed PStates. + + See `nvmlPstates_t`. + """ + PSTATE_0 = (NVML_PSTATE_0, 'Performance state 0 -- Maximum Performance.') + PSTATE_1 = (NVML_PSTATE_1, 'Performance state 1.') + PSTATE_2 = (NVML_PSTATE_2, 'Performance state 2.') + PSTATE_3 = (NVML_PSTATE_3, 'Performance state 3.') + PSTATE_4 = (NVML_PSTATE_4, 'Performance state 4.') + PSTATE_5 = (NVML_PSTATE_5, 'Performance state 5.') + PSTATE_6 = (NVML_PSTATE_6, 'Performance state 6.') + PSTATE_7 = (NVML_PSTATE_7, 'Performance state 7.') + PSTATE_8 = (NVML_PSTATE_8, 'Performance state 8.') + PSTATE_9 = (NVML_PSTATE_9, 'Performance state 9.') + PSTATE_10 = (NVML_PSTATE_10, 'Performance state 10.') + PSTATE_11 = (NVML_PSTATE_11, 'Performance state 11.') + PSTATE_12 = (NVML_PSTATE_12, 'Performance state 12.') + PSTATE_13 = (NVML_PSTATE_13, 'Performance state 13.') + PSTATE_14 = (NVML_PSTATE_14, 'Performance state 14.') + PSTATE_15 = (NVML_PSTATE_15, 'Performance state 15 -- Minimum Performance.') + PSTATE_UNKNOWN = (NVML_PSTATE_UNKNOWN, 'Unknown performance state.') + +class GpuOperationMode(_FastEnum): + """ + GPU Operation Mode GOM allows to reduce power usage and optimize GPU + throughput by disabling GPU features. Each GOM is designed to meet + specific user needs. + + See `nvmlGpuOperationMode_t`. + """ + GOM_ALL_ON = (NVML_GOM_ALL_ON, 'Everything is enabled and running at full speed.') + GOM_COMPUTE = (NVML_GOM_COMPUTE, 'Designed for running only compute tasks. Graphics operations are not allowed') + GOM_LOW_DP = (NVML_GOM_LOW_DP, "Designed for running graphics applications that don't require high bandwidth double precision") + +class InforomObject(_FastEnum): + """ + Available infoROM objects. + + See `nvmlInforomObject_t`. + """ + INFOROM_OEM = (NVML_INFOROM_OEM, 'An object defined by OEM.') + INFOROM_ECC = (NVML_INFOROM_ECC, 'The ECC object determining the level of ECC support.') + INFOROM_POWER = (NVML_INFOROM_POWER, 'The power management object.') + INFOROM_DEN = (NVML_INFOROM_DEN, 'DRAM Encryption object.') + INFOROM_COUNT = (NVML_INFOROM_COUNT, 'This counts the number of infoROM objects the driver knows about.') + +class Return(_FastEnum): + """ + Return values for NVML API calls. + + See `nvmlReturn_t`. + """ + SUCCESS = (NVML_SUCCESS, 'The operation was successful.') + ERROR_UNINITIALIZED = (NVML_ERROR_UNINITIALIZED, 'NVML was not first initialized with nvmlInit()') + ERROR_INVALID_ARGUMENT = (NVML_ERROR_INVALID_ARGUMENT, 'A supplied argument is invalid.') + ERROR_NOT_SUPPORTED = (NVML_ERROR_NOT_SUPPORTED, 'The requested operation is not available on target device.') + ERROR_NO_PERMISSION = (NVML_ERROR_NO_PERMISSION, 'The current user does not have permission for operation.') + ERROR_ALREADY_INITIALIZED = (NVML_ERROR_ALREADY_INITIALIZED, 'Deprecated: Multiple initializations are now allowed through ref counting.') + ERROR_NOT_FOUND = (NVML_ERROR_NOT_FOUND, 'A query to find an object was unsuccessful.') + ERROR_INSUFFICIENT_SIZE = (NVML_ERROR_INSUFFICIENT_SIZE, 'An input argument is not large enough.') + ERROR_INSUFFICIENT_POWER = (NVML_ERROR_INSUFFICIENT_POWER, "A device's external power cables are not properly attached.") + ERROR_DRIVER_NOT_LOADED = (NVML_ERROR_DRIVER_NOT_LOADED, 'NVIDIA driver is not loaded.') + ERROR_TIMEOUT = (NVML_ERROR_TIMEOUT, 'User provided timeout passed.') + ERROR_IRQ_ISSUE = (NVML_ERROR_IRQ_ISSUE, 'NVIDIA Kernel detected an interrupt issue with a GPU.') + ERROR_LIBRARY_NOT_FOUND = (NVML_ERROR_LIBRARY_NOT_FOUND, "NVML Shared Library couldn't be found or loaded.") + ERROR_FUNCTION_NOT_FOUND = (NVML_ERROR_FUNCTION_NOT_FOUND, "Local version of NVML doesn't implement this function.") + ERROR_CORRUPTED_INFOROM = (NVML_ERROR_CORRUPTED_INFOROM, 'infoROM is corrupted') + ERROR_GPU_IS_LOST = (NVML_ERROR_GPU_IS_LOST, 'The GPU has fallen off the bus or has otherwise become inaccessible.') + ERROR_RESET_REQUIRED = (NVML_ERROR_RESET_REQUIRED, 'The GPU requires a reset before it can be used again.') + ERROR_OPERATING_SYSTEM = (NVML_ERROR_OPERATING_SYSTEM, 'The GPU control device has been blocked by the operating system/cgroups.') + ERROR_LIB_RM_VERSION_MISMATCH = (NVML_ERROR_LIB_RM_VERSION_MISMATCH, 'RM detects a driver/library version mismatch.') + ERROR_IN_USE = (NVML_ERROR_IN_USE, 'An operation cannot be performed because the GPU is currently in use.') + ERROR_MEMORY = (NVML_ERROR_MEMORY, 'Insufficient memory.') + ERROR_NO_DATA = (NVML_ERROR_NO_DATA, 'No data.') + ERROR_VGPU_ECC_NOT_SUPPORTED = (NVML_ERROR_VGPU_ECC_NOT_SUPPORTED, 'The requested vgpu operation is not available on target device, becasue ECC is enabled.') + ERROR_INSUFFICIENT_RESOURCES = (NVML_ERROR_INSUFFICIENT_RESOURCES, 'Ran out of critical resources, other than memory.') + ERROR_FREQ_NOT_SUPPORTED = (NVML_ERROR_FREQ_NOT_SUPPORTED, 'Ran out of critical resources, other than memory.') + ERROR_ARGUMENT_VERSION_MISMATCH = (NVML_ERROR_ARGUMENT_VERSION_MISMATCH, 'The provided version is invalid/unsupported.') + ERROR_DEPRECATED = (NVML_ERROR_DEPRECATED, 'The requested functionality has been deprecated.') + ERROR_NOT_READY = (NVML_ERROR_NOT_READY, 'The system is not ready for the request.') + ERROR_GPU_NOT_FOUND = (NVML_ERROR_GPU_NOT_FOUND, 'No GPUs were found.') + ERROR_INVALID_STATE = (NVML_ERROR_INVALID_STATE, 'Resource not in correct state to perform requested operation.') + ERROR_RESET_TYPE_NOT_SUPPORTED = (NVML_ERROR_RESET_TYPE_NOT_SUPPORTED, 'Reset not supported for given device/parameters.') + ERROR_UNKNOWN = (NVML_ERROR_UNKNOWN, 'An internal driver error occurred.') + +class MemoryLocation(_FastEnum): + """ + See `nvmlDeviceGetMemoryErrorCounter` + + See `nvmlMemoryLocation_t`. + """ + L1_CACHE = (NVML_MEMORY_LOCATION_L1_CACHE, 'GPU L1 Cache.') + L2_CACHE = (NVML_MEMORY_LOCATION_L2_CACHE, 'GPU L2 Cache.') + DRAM = (NVML_MEMORY_LOCATION_DRAM, 'Turing+ DRAM.') + DEVICE_MEMORY = (NVML_MEMORY_LOCATION_DEVICE_MEMORY, 'GPU Device Memory.') + REGISTER_FILE = (NVML_MEMORY_LOCATION_REGISTER_FILE, 'GPU Register File.') + TEXTURE_MEMORY = (NVML_MEMORY_LOCATION_TEXTURE_MEMORY, 'GPU Texture Memory.') + TEXTURE_SHM = (NVML_MEMORY_LOCATION_TEXTURE_SHM, 'Shared memory.') + CBU = (NVML_MEMORY_LOCATION_CBU, 'CBU.') + SRAM = (NVML_MEMORY_LOCATION_SRAM, 'Turing+ SRAM.') + COUNT = (NVML_MEMORY_LOCATION_COUNT, 'This counts the number of memory locations the driver knows about.') + +class PageRetirementCause(_FastEnum): + """ + Causes for page retirement + + See `nvmlPageRetirementCause_t`. + """ + MULTIPLE_SINGLE_BIT_ECC_ERRORS = (NVML_PAGE_RETIREMENT_CAUSE_MULTIPLE_SINGLE_BIT_ECC_ERRORS, 'Page was retired due to multiple single bit ECC error.') + DOUBLE_BIT_ECC_ERROR = (NVML_PAGE_RETIREMENT_CAUSE_DOUBLE_BIT_ECC_ERROR, 'Page was retired due to double bit ECC error.') COUNT = NVML_PAGE_RETIREMENT_CAUSE_COUNT -class RestrictedAPI(_IntEnum): - """See `nvmlRestrictedAPI_t`.""" - SET_APPLICATION_CLOCKS = NVML_RESTRICTED_API_SET_APPLICATION_CLOCKS - SET_AUTO_BOOSTED_CLOCKS = NVML_RESTRICTED_API_SET_AUTO_BOOSTED_CLOCKS +class RestrictedAPI(_FastEnum): + """ + API types that allow changes to default permission restrictions + + See `nvmlRestrictedAPI_t`. + """ + SET_APPLICATION_CLOCKS = (NVML_RESTRICTED_API_SET_APPLICATION_CLOCKS, 'APIs that change application clocks, see nvmlDeviceSetApplicationsClocks and see nvmlDeviceResetApplicationsClocks. Deprecated, keeping definition for backward compatibility.') + SET_AUTO_BOOSTED_CLOCKS = (NVML_RESTRICTED_API_SET_AUTO_BOOSTED_CLOCKS, 'APIs that enable/disable Auto Boosted clocks see nvmlDeviceSetAutoBoostedClocksEnabled') COUNT = NVML_RESTRICTED_API_COUNT -class GpuUtilizationDomainId(_IntEnum): - """See `nvmlGpuUtilizationDomainId_t`.""" - GPU_UTILIZATION_DOMAIN_GPU = NVML_GPU_UTILIZATION_DOMAIN_GPU - GPU_UTILIZATION_DOMAIN_FB = NVML_GPU_UTILIZATION_DOMAIN_FB - GPU_UTILIZATION_DOMAIN_VID = NVML_GPU_UTILIZATION_DOMAIN_VID - GPU_UTILIZATION_DOMAIN_BUS = NVML_GPU_UTILIZATION_DOMAIN_BUS - -class GpuVirtualizationMode(_IntEnum): - """See `nvmlGpuVirtualizationMode_t`.""" - NONE = NVML_GPU_VIRTUALIZATION_MODE_NONE - PASSTHROUGH = NVML_GPU_VIRTUALIZATION_MODE_PASSTHROUGH - VGPU = NVML_GPU_VIRTUALIZATION_MODE_VGPU - HOST_VGPU = NVML_GPU_VIRTUALIZATION_MODE_HOST_VGPU - HOST_VSGA = NVML_GPU_VIRTUALIZATION_MODE_HOST_VSGA - -class HostVgpuMode(_IntEnum): - """See `nvmlHostVgpuMode_t`.""" - NON_SRIOV = NVML_HOST_VGPU_MODE_NON_SRIOV - SRIOV = NVML_HOST_VGPU_MODE_SRIOV - -class VgpuVmIdType(_IntEnum): - """See `nvmlVgpuVmIdType_t`.""" - VGPU_VM_ID_DOMAIN_ID = NVML_VGPU_VM_ID_DOMAIN_ID - VGPU_VM_ID_UUID = NVML_VGPU_VM_ID_UUID - -class VgpuGuestInfoState(_IntEnum): - """See `nvmlVgpuGuestInfoState_t`.""" - VGPU_INSTANCE_GUEST_INFO_STATE_UNINITIALIZED = NVML_VGPU_INSTANCE_GUEST_INFO_STATE_UNINITIALIZED - VGPU_INSTANCE_GUEST_INFO_STATE_INITIALIZED = NVML_VGPU_INSTANCE_GUEST_INFO_STATE_INITIALIZED - -class GridLicenseFeatureCode(_IntEnum): - """See `nvmlGridLicenseFeatureCode_t`.""" - UNKNOWN = NVML_GRID_LICENSE_FEATURE_CODE_UNKNOWN - VGPU = NVML_GRID_LICENSE_FEATURE_CODE_VGPU - NVIDIA_RTX = NVML_GRID_LICENSE_FEATURE_CODE_NVIDIA_RTX - VWORKSTATION = NVML_GRID_LICENSE_FEATURE_CODE_VWORKSTATION - GAMING = NVML_GRID_LICENSE_FEATURE_CODE_GAMING - COMPUTE = NVML_GRID_LICENSE_FEATURE_CODE_COMPUTE - -class VgpuCapability(_IntEnum): - """See `nvmlVgpuCapability_t`.""" - VGPU_CAP_NVLINK_P2P = NVML_VGPU_CAP_NVLINK_P2P - VGPU_CAP_GPUDIRECT = NVML_VGPU_CAP_GPUDIRECT - VGPU_CAP_MULTI_VGPU_EXCLUSIVE = NVML_VGPU_CAP_MULTI_VGPU_EXCLUSIVE - VGPU_CAP_EXCLUSIVE_TYPE = NVML_VGPU_CAP_EXCLUSIVE_TYPE - VGPU_CAP_EXCLUSIVE_SIZE = NVML_VGPU_CAP_EXCLUSIVE_SIZE +class GpuUtilizationDomainId(_FastEnum): + """ + Represents the GPU utilization domains + + See `nvmlGpuUtilizationDomainId_t`. + """ + GPU_UTILIZATION_DOMAIN_GPU = (NVML_GPU_UTILIZATION_DOMAIN_GPU, 'Graphics engine domain.') + GPU_UTILIZATION_DOMAIN_FB = (NVML_GPU_UTILIZATION_DOMAIN_FB, 'Frame buffer domain.') + GPU_UTILIZATION_DOMAIN_VID = (NVML_GPU_UTILIZATION_DOMAIN_VID, 'Video engine domain.') + GPU_UTILIZATION_DOMAIN_BUS = (NVML_GPU_UTILIZATION_DOMAIN_BUS, 'Bus interface domain.') + +class GpuVirtualizationMode(_FastEnum): + """ + GPU virtualization mode types. + + See `nvmlGpuVirtualizationMode_t`. + """ + NONE = (NVML_GPU_VIRTUALIZATION_MODE_NONE, 'Represents Bare Metal GPU.') + PASSTHROUGH = (NVML_GPU_VIRTUALIZATION_MODE_PASSTHROUGH, 'Device is associated with GPU-Passthorugh.') + VGPU = (NVML_GPU_VIRTUALIZATION_MODE_VGPU, 'Device is associated with vGPU inside virtual machine.') + HOST_VGPU = (NVML_GPU_VIRTUALIZATION_MODE_HOST_VGPU, 'Device is associated with VGX hypervisor in vGPU mode.') + HOST_VSGA = (NVML_GPU_VIRTUALIZATION_MODE_HOST_VSGA, 'Device is associated with VGX hypervisor in vSGA mode.') + +class HostVgpuMode(_FastEnum): + """ + Host vGPU modes + + See `nvmlHostVgpuMode_t`. + """ + NON_SRIOV = (NVML_HOST_VGPU_MODE_NON_SRIOV, 'Non SR-IOV mode.') + SRIOV = (NVML_HOST_VGPU_MODE_SRIOV, 'SR-IOV mode.') + +class VgpuVmIdType(_FastEnum): + """ + Types of VM identifiers + + See `nvmlVgpuVmIdType_t`. + """ + VGPU_VM_ID_DOMAIN_ID = (NVML_VGPU_VM_ID_DOMAIN_ID, 'VM ID represents DOMAIN ID.') + VGPU_VM_ID_UUID = (NVML_VGPU_VM_ID_UUID, 'VM ID represents UUID.') + +class VgpuGuestInfoState(_FastEnum): + """ + vGPU GUEST info state + + See `nvmlVgpuGuestInfoState_t`. + """ + VGPU_INSTANCE_GUEST_INFO_STATE_UNINITIALIZED = (NVML_VGPU_INSTANCE_GUEST_INFO_STATE_UNINITIALIZED, 'Guest-dependent fields uninitialized.') + VGPU_INSTANCE_GUEST_INFO_STATE_INITIALIZED = (NVML_VGPU_INSTANCE_GUEST_INFO_STATE_INITIALIZED, 'Guest-dependent fields initialized.') + +class GridLicenseFeatureCode(_FastEnum): + """ + vGPU software licensable features + + See `nvmlGridLicenseFeatureCode_t`. + """ + UNKNOWN = (NVML_GRID_LICENSE_FEATURE_CODE_UNKNOWN, 'Unknown.') + VGPU = (NVML_GRID_LICENSE_FEATURE_CODE_VGPU, 'Virtual GPU.') + NVIDIA_RTX = (NVML_GRID_LICENSE_FEATURE_CODE_NVIDIA_RTX, 'Nvidia RTX.') + VWORKSTATION = (NVML_GRID_LICENSE_FEATURE_CODE_VWORKSTATION, 'Deprecated, do not use.') + GAMING = (NVML_GRID_LICENSE_FEATURE_CODE_GAMING, 'Gaming.') + COMPUTE = (NVML_GRID_LICENSE_FEATURE_CODE_COMPUTE, 'Compute.') + +class VgpuCapability(_FastEnum): + """ + vGPU queryable capabilities + + See `nvmlVgpuCapability_t`. + """ + VGPU_CAP_NVLINK_P2P = (NVML_VGPU_CAP_NVLINK_P2P, 'P2P over NVLink is supported.') + VGPU_CAP_GPUDIRECT = (NVML_VGPU_CAP_GPUDIRECT, 'GPUDirect capability is supported.') + VGPU_CAP_MULTI_VGPU_EXCLUSIVE = (NVML_VGPU_CAP_MULTI_VGPU_EXCLUSIVE, 'vGPU profile cannot be mixed with other vGPU profiles in same VM') + VGPU_CAP_EXCLUSIVE_TYPE = (NVML_VGPU_CAP_EXCLUSIVE_TYPE, 'vGPU profile cannot run on a GPU alongside other profiles of different type') + VGPU_CAP_EXCLUSIVE_SIZE = (NVML_VGPU_CAP_EXCLUSIVE_SIZE, 'vGPU profile cannot run on a GPU alongside other profiles of different size') VGPU_CAP_COUNT = NVML_VGPU_CAP_COUNT -class VgpuDriverCapability(_IntEnum): - """See `nvmlVgpuDriverCapability_t`.""" - VGPU_DRIVER_CAP_HETEROGENEOUS_MULTI_VGPU = NVML_VGPU_DRIVER_CAP_HETEROGENEOUS_MULTI_VGPU - VGPU_DRIVER_CAP_WARM_UPDATE = NVML_VGPU_DRIVER_CAP_WARM_UPDATE +class VgpuDriverCapability(_FastEnum): + """ + vGPU driver queryable capabilities + + See `nvmlVgpuDriverCapability_t`. + """ + VGPU_DRIVER_CAP_HETEROGENEOUS_MULTI_VGPU = (NVML_VGPU_DRIVER_CAP_HETEROGENEOUS_MULTI_VGPU, 'Supports mixing of different vGPU profiles within one guest VM.') + VGPU_DRIVER_CAP_WARM_UPDATE = (NVML_VGPU_DRIVER_CAP_WARM_UPDATE, 'Supports FSR and warm update of vGPU host driver without terminating the running guest VM.') VGPU_DRIVER_CAP_COUNT = NVML_VGPU_DRIVER_CAP_COUNT -class DeviceVgpuCapability(_IntEnum): - """See `nvmlDeviceVgpuCapability_t`.""" - DEVICE_VGPU_CAP_FRACTIONAL_MULTI_VGPU = NVML_DEVICE_VGPU_CAP_FRACTIONAL_MULTI_VGPU - DEVICE_VGPU_CAP_HETEROGENEOUS_TIMESLICE_PROFILES = NVML_DEVICE_VGPU_CAP_HETEROGENEOUS_TIMESLICE_PROFILES - DEVICE_VGPU_CAP_HETEROGENEOUS_TIMESLICE_SIZES = NVML_DEVICE_VGPU_CAP_HETEROGENEOUS_TIMESLICE_SIZES - DEVICE_VGPU_CAP_READ_DEVICE_BUFFER_BW = NVML_DEVICE_VGPU_CAP_READ_DEVICE_BUFFER_BW - DEVICE_VGPU_CAP_WRITE_DEVICE_BUFFER_BW = NVML_DEVICE_VGPU_CAP_WRITE_DEVICE_BUFFER_BW - DEVICE_VGPU_CAP_DEVICE_STREAMING = NVML_DEVICE_VGPU_CAP_DEVICE_STREAMING - DEVICE_VGPU_CAP_MINI_QUARTER_GPU = NVML_DEVICE_VGPU_CAP_MINI_QUARTER_GPU - DEVICE_VGPU_CAP_COMPUTE_MEDIA_ENGINE_GPU = NVML_DEVICE_VGPU_CAP_COMPUTE_MEDIA_ENGINE_GPU - DEVICE_VGPU_CAP_WARM_UPDATE = NVML_DEVICE_VGPU_CAP_WARM_UPDATE - DEVICE_VGPU_CAP_HOMOGENEOUS_PLACEMENTS = NVML_DEVICE_VGPU_CAP_HOMOGENEOUS_PLACEMENTS - DEVICE_VGPU_CAP_MIG_TIMESLICING_SUPPORTED = NVML_DEVICE_VGPU_CAP_MIG_TIMESLICING_SUPPORTED - DEVICE_VGPU_CAP_MIG_TIMESLICING_ENABLED = NVML_DEVICE_VGPU_CAP_MIG_TIMESLICING_ENABLED +class DeviceVgpuCapability(_FastEnum): + """ + Device vGPU queryable capabilities + + See `nvmlDeviceVgpuCapability_t`. + """ + DEVICE_VGPU_CAP_FRACTIONAL_MULTI_VGPU = (NVML_DEVICE_VGPU_CAP_FRACTIONAL_MULTI_VGPU, 'Query whether the fractional vGPU profiles on this GPU can be used in multi-vGPU configurations.') + DEVICE_VGPU_CAP_HETEROGENEOUS_TIMESLICE_PROFILES = (NVML_DEVICE_VGPU_CAP_HETEROGENEOUS_TIMESLICE_PROFILES, 'Query whether the GPU support concurrent execution of timesliced vGPU profiles of differing types.') + DEVICE_VGPU_CAP_HETEROGENEOUS_TIMESLICE_SIZES = (NVML_DEVICE_VGPU_CAP_HETEROGENEOUS_TIMESLICE_SIZES, 'Query whether the GPU support concurrent execution of timesliced vGPU profiles of differing framebuffer sizes.') + DEVICE_VGPU_CAP_READ_DEVICE_BUFFER_BW = (NVML_DEVICE_VGPU_CAP_READ_DEVICE_BUFFER_BW, "Query the GPU's read_device_buffer expected bandwidth capacity in megabytes per second.") + DEVICE_VGPU_CAP_WRITE_DEVICE_BUFFER_BW = (NVML_DEVICE_VGPU_CAP_WRITE_DEVICE_BUFFER_BW, "Query the GPU's write_device_buffer expected bandwidth capacity in megabytes per second.") + DEVICE_VGPU_CAP_DEVICE_STREAMING = (NVML_DEVICE_VGPU_CAP_DEVICE_STREAMING, 'Query whether the vGPU profiles on the GPU supports migration data streaming.') + DEVICE_VGPU_CAP_MINI_QUARTER_GPU = (NVML_DEVICE_VGPU_CAP_MINI_QUARTER_GPU, 'Set/Get support for mini-quarter vGPU profiles.') + DEVICE_VGPU_CAP_COMPUTE_MEDIA_ENGINE_GPU = (NVML_DEVICE_VGPU_CAP_COMPUTE_MEDIA_ENGINE_GPU, 'Set/Get support for compute media engine vGPU profiles.') + DEVICE_VGPU_CAP_WARM_UPDATE = (NVML_DEVICE_VGPU_CAP_WARM_UPDATE, 'Query whether the GPU supports FSR and warm update.') + DEVICE_VGPU_CAP_HOMOGENEOUS_PLACEMENTS = (NVML_DEVICE_VGPU_CAP_HOMOGENEOUS_PLACEMENTS, 'Query whether the GPU supports reporting of placements of timesliced vGPU profiles with identical framebuffer sizes.') + DEVICE_VGPU_CAP_MIG_TIMESLICING_SUPPORTED = (NVML_DEVICE_VGPU_CAP_MIG_TIMESLICING_SUPPORTED, 'Query whether the GPU supports timesliced vGPU on MIG.') + DEVICE_VGPU_CAP_MIG_TIMESLICING_ENABLED = (NVML_DEVICE_VGPU_CAP_MIG_TIMESLICING_ENABLED, 'Set/Get MIG timesliced mode reporting, without impacting the underlying functionality.') DEVICE_VGPU_CAP_COUNT = NVML_DEVICE_VGPU_CAP_COUNT -class DeviceGpuRecoveryAction(_IntEnum): - """See `nvmlDeviceGpuRecoveryAction_t`.""" +class DeviceGpuRecoveryAction(_FastEnum): + """ + Enum describing the GPU Recovery Action + + See `nvmlDeviceGpuRecoveryAction_t`. + """ GPU_RECOVERY_ACTION_NONE = NVML_GPU_RECOVERY_ACTION_NONE GPU_RECOVERY_ACTION_GPU_RESET = NVML_GPU_RECOVERY_ACTION_GPU_RESET GPU_RECOVERY_ACTION_NODE_REBOOT = NVML_GPU_RECOVERY_ACTION_NODE_REBOOT GPU_RECOVERY_ACTION_DRAIN_P2P = NVML_GPU_RECOVERY_ACTION_DRAIN_P2P GPU_RECOVERY_ACTION_DRAIN_AND_RESET = NVML_GPU_RECOVERY_ACTION_DRAIN_AND_RESET -class FanState(_IntEnum): - """See `nvmlFanState_t`.""" - FAN_NORMAL = NVML_FAN_NORMAL - FAN_FAILED = NVML_FAN_FAILED - -class LedColor(_IntEnum): - """See `nvmlLedColor_t`.""" - GREEN = NVML_LED_COLOR_GREEN - AMBER = NVML_LED_COLOR_AMBER - -class EncoderType(_IntEnum): - """See `nvmlEncoderType_t`.""" - ENCODER_QUERY_H264 = NVML_ENCODER_QUERY_H264 - ENCODER_QUERY_HEVC = NVML_ENCODER_QUERY_HEVC - ENCODER_QUERY_AV1 = NVML_ENCODER_QUERY_AV1 - ENCODER_QUERY_UNKNOWN = NVML_ENCODER_QUERY_UNKNOWN - -class FBCSessionType(_IntEnum): - """See `nvmlFBCSessionType_t`.""" - UNKNOWN = NVML_FBC_SESSION_TYPE_UNKNOWN - TOSYS = NVML_FBC_SESSION_TYPE_TOSYS - CUDA = NVML_FBC_SESSION_TYPE_CUDA - VID = NVML_FBC_SESSION_TYPE_VID - HWENC = NVML_FBC_SESSION_TYPE_HWENC - -class DetachGpuState(_IntEnum): - """See `nvmlDetachGpuState_t`.""" +class FanState(_FastEnum): + """ + Fan state enum. + + See `nvmlFanState_t`. + """ + FAN_NORMAL = (NVML_FAN_NORMAL, 'Fan is working properly.') + FAN_FAILED = (NVML_FAN_FAILED, 'Fan has failed.') + +class LedColor(_FastEnum): + """ + Led color enum. + + See `nvmlLedColor_t`. + """ + GREEN = (NVML_LED_COLOR_GREEN, 'GREEN, indicates good health.') + AMBER = (NVML_LED_COLOR_AMBER, 'AMBER, indicates problem.') + +class EncoderType(_FastEnum): + """ + Represents type of encoder for capacity can be queried + + See `nvmlEncoderType_t`. + """ + ENCODER_QUERY_H264 = (NVML_ENCODER_QUERY_H264, 'H264 encoder.') + ENCODER_QUERY_HEVC = (NVML_ENCODER_QUERY_HEVC, 'HEVC encoder.') + ENCODER_QUERY_AV1 = (NVML_ENCODER_QUERY_AV1, 'AV1 encoder.') + ENCODER_QUERY_UNKNOWN = (NVML_ENCODER_QUERY_UNKNOWN, 'Unknown encoder.') + +class FBCSessionType(_FastEnum): + """ + Represents frame buffer capture session type + + See `nvmlFBCSessionType_t`. + """ + UNKNOWN = (NVML_FBC_SESSION_TYPE_UNKNOWN, 'Unknown.') + TOSYS = (NVML_FBC_SESSION_TYPE_TOSYS, 'ToSys.') + CUDA = (NVML_FBC_SESSION_TYPE_CUDA, 'Cuda.') + VID = (NVML_FBC_SESSION_TYPE_VID, 'Vid.') + HWENC = (NVML_FBC_SESSION_TYPE_HWENC, 'HEnc.') + +class DetachGpuState(_FastEnum): + """ + Is the GPU device to be removed from the kernel by + nvmlDeviceRemoveGpu() + + See `nvmlDetachGpuState_t`. + """ DETACH_GPU_KEEP = NVML_DETACH_GPU_KEEP DETACH_GPU_REMOVE = NVML_DETACH_GPU_REMOVE -class PcieLinkState(_IntEnum): - """See `nvmlPcieLinkState_t`.""" +class PcieLinkState(_FastEnum): + """ + Parent bridge PCIe link state requested by nvmlDeviceRemoveGpu() + + See `nvmlPcieLinkState_t`. + """ PCIE_LINK_KEEP = NVML_PCIE_LINK_KEEP PCIE_LINK_SHUT_DOWN = NVML_PCIE_LINK_SHUT_DOWN -class ClockLimitId(_IntEnum): - """See `nvmlClockLimitId_t`.""" +class ClockLimitId(_FastEnum): + """ + See `nvmlClockLimitId_t`. + """ RANGE_START = NVML_CLOCK_LIMIT_ID_RANGE_START TDP = NVML_CLOCK_LIMIT_ID_TDP UNLIMITED = NVML_CLOCK_LIMIT_ID_UNLIMITED -class VgpuVmCompatibility(_IntEnum): - """See `nvmlVgpuVmCompatibility_t`.""" - NONE = NVML_VGPU_VM_COMPATIBILITY_NONE - COLD = NVML_VGPU_VM_COMPATIBILITY_COLD - HIBERNATE = NVML_VGPU_VM_COMPATIBILITY_HIBERNATE - SLEEP = NVML_VGPU_VM_COMPATIBILITY_SLEEP - LIVE = NVML_VGPU_VM_COMPATIBILITY_LIVE - -class VgpuPgpuCompatibilityLimitCode(_IntEnum): - """See `nvmlVgpuPgpuCompatibilityLimitCode_t`.""" - VGPU_COMPATIBILITY_LIMIT_NONE = NVML_VGPU_COMPATIBILITY_LIMIT_NONE - VGPU_COMPATIBILITY_LIMIT_HOST_DRIVER = NVML_VGPU_COMPATIBILITY_LIMIT_HOST_DRIVER - VGPU_COMPATIBILITY_LIMIT_GUEST_DRIVER = NVML_VGPU_COMPATIBILITY_LIMIT_GUEST_DRIVER - VGPU_COMPATIBILITY_LIMIT_GPU = NVML_VGPU_COMPATIBILITY_LIMIT_GPU - VGPU_COMPATIBILITY_LIMIT_OTHER = NVML_VGPU_COMPATIBILITY_LIMIT_OTHER - -class GpmMetricId(_IntEnum): - """See `nvmlGpmMetricId_t`.""" - GPM_METRIC_GRAPHICS_UTIL = NVML_GPM_METRIC_GRAPHICS_UTIL - GPM_METRIC_SM_UTIL = NVML_GPM_METRIC_SM_UTIL - GPM_METRIC_SM_OCCUPANCY = NVML_GPM_METRIC_SM_OCCUPANCY - GPM_METRIC_INTEGER_UTIL = NVML_GPM_METRIC_INTEGER_UTIL - GPM_METRIC_ANY_TENSOR_UTIL = NVML_GPM_METRIC_ANY_TENSOR_UTIL - GPM_METRIC_DFMA_TENSOR_UTIL = NVML_GPM_METRIC_DFMA_TENSOR_UTIL - GPM_METRIC_HMMA_TENSOR_UTIL = NVML_GPM_METRIC_HMMA_TENSOR_UTIL - GPM_METRIC_IMMA_TENSOR_UTIL = NVML_GPM_METRIC_IMMA_TENSOR_UTIL - GPM_METRIC_DRAM_BW_UTIL = NVML_GPM_METRIC_DRAM_BW_UTIL - GPM_METRIC_FP64_UTIL = NVML_GPM_METRIC_FP64_UTIL - GPM_METRIC_FP32_UTIL = NVML_GPM_METRIC_FP32_UTIL - GPM_METRIC_FP16_UTIL = NVML_GPM_METRIC_FP16_UTIL - GPM_METRIC_PCIE_TX_PER_SEC = NVML_GPM_METRIC_PCIE_TX_PER_SEC - GPM_METRIC_PCIE_RX_PER_SEC = NVML_GPM_METRIC_PCIE_RX_PER_SEC - GPM_METRIC_NVDEC_0_UTIL = NVML_GPM_METRIC_NVDEC_0_UTIL - GPM_METRIC_NVDEC_1_UTIL = NVML_GPM_METRIC_NVDEC_1_UTIL - GPM_METRIC_NVDEC_2_UTIL = NVML_GPM_METRIC_NVDEC_2_UTIL - GPM_METRIC_NVDEC_3_UTIL = NVML_GPM_METRIC_NVDEC_3_UTIL - GPM_METRIC_NVDEC_4_UTIL = NVML_GPM_METRIC_NVDEC_4_UTIL - GPM_METRIC_NVDEC_5_UTIL = NVML_GPM_METRIC_NVDEC_5_UTIL - GPM_METRIC_NVDEC_6_UTIL = NVML_GPM_METRIC_NVDEC_6_UTIL - GPM_METRIC_NVDEC_7_UTIL = NVML_GPM_METRIC_NVDEC_7_UTIL - GPM_METRIC_NVJPG_0_UTIL = NVML_GPM_METRIC_NVJPG_0_UTIL - GPM_METRIC_NVJPG_1_UTIL = NVML_GPM_METRIC_NVJPG_1_UTIL - GPM_METRIC_NVJPG_2_UTIL = NVML_GPM_METRIC_NVJPG_2_UTIL - GPM_METRIC_NVJPG_3_UTIL = NVML_GPM_METRIC_NVJPG_3_UTIL - GPM_METRIC_NVJPG_4_UTIL = NVML_GPM_METRIC_NVJPG_4_UTIL - GPM_METRIC_NVJPG_5_UTIL = NVML_GPM_METRIC_NVJPG_5_UTIL - GPM_METRIC_NVJPG_6_UTIL = NVML_GPM_METRIC_NVJPG_6_UTIL - GPM_METRIC_NVJPG_7_UTIL = NVML_GPM_METRIC_NVJPG_7_UTIL - GPM_METRIC_NVOFA_0_UTIL = NVML_GPM_METRIC_NVOFA_0_UTIL - GPM_METRIC_NVOFA_1_UTIL = NVML_GPM_METRIC_NVOFA_1_UTIL - GPM_METRIC_NVLINK_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_TOTAL_RX_PER_SEC - GPM_METRIC_NVLINK_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_TOTAL_TX_PER_SEC - GPM_METRIC_NVLINK_L0_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L0_RX_PER_SEC - GPM_METRIC_NVLINK_L0_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L0_TX_PER_SEC - GPM_METRIC_NVLINK_L1_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L1_RX_PER_SEC - GPM_METRIC_NVLINK_L1_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L1_TX_PER_SEC - GPM_METRIC_NVLINK_L2_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L2_RX_PER_SEC - GPM_METRIC_NVLINK_L2_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L2_TX_PER_SEC - GPM_METRIC_NVLINK_L3_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L3_RX_PER_SEC - GPM_METRIC_NVLINK_L3_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L3_TX_PER_SEC - GPM_METRIC_NVLINK_L4_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L4_RX_PER_SEC - GPM_METRIC_NVLINK_L4_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L4_TX_PER_SEC - GPM_METRIC_NVLINK_L5_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L5_RX_PER_SEC - GPM_METRIC_NVLINK_L5_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L5_TX_PER_SEC - GPM_METRIC_NVLINK_L6_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L6_RX_PER_SEC - GPM_METRIC_NVLINK_L6_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L6_TX_PER_SEC - GPM_METRIC_NVLINK_L7_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L7_RX_PER_SEC - GPM_METRIC_NVLINK_L7_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L7_TX_PER_SEC - GPM_METRIC_NVLINK_L8_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L8_RX_PER_SEC - GPM_METRIC_NVLINK_L8_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L8_TX_PER_SEC - GPM_METRIC_NVLINK_L9_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L9_RX_PER_SEC - GPM_METRIC_NVLINK_L9_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L9_TX_PER_SEC - GPM_METRIC_NVLINK_L10_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L10_RX_PER_SEC - GPM_METRIC_NVLINK_L10_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L10_TX_PER_SEC - GPM_METRIC_NVLINK_L11_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L11_RX_PER_SEC - GPM_METRIC_NVLINK_L11_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L11_TX_PER_SEC - GPM_METRIC_NVLINK_L12_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L12_RX_PER_SEC - GPM_METRIC_NVLINK_L12_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L12_TX_PER_SEC - GPM_METRIC_NVLINK_L13_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L13_RX_PER_SEC - GPM_METRIC_NVLINK_L13_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L13_TX_PER_SEC - GPM_METRIC_NVLINK_L14_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L14_RX_PER_SEC - GPM_METRIC_NVLINK_L14_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L14_TX_PER_SEC - GPM_METRIC_NVLINK_L15_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L15_RX_PER_SEC - GPM_METRIC_NVLINK_L15_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L15_TX_PER_SEC - GPM_METRIC_NVLINK_L16_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L16_RX_PER_SEC - GPM_METRIC_NVLINK_L16_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L16_TX_PER_SEC - GPM_METRIC_NVLINK_L17_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L17_RX_PER_SEC - GPM_METRIC_NVLINK_L17_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L17_TX_PER_SEC +class VgpuVmCompatibility(_FastEnum): + """ + vGPU VM compatibility codes + + See `nvmlVgpuVmCompatibility_t`. + """ + NONE = (NVML_VGPU_VM_COMPATIBILITY_NONE, 'vGPU is not runnable') + COLD = (NVML_VGPU_VM_COMPATIBILITY_COLD, 'vGPU is runnable from a cold / powered-off state (ACPI S5)') + HIBERNATE = (NVML_VGPU_VM_COMPATIBILITY_HIBERNATE, 'vGPU is runnable from a hibernated state (ACPI S4)') + SLEEP = (NVML_VGPU_VM_COMPATIBILITY_SLEEP, 'vGPU is runnable from a sleeped state (ACPI S3)') + LIVE = (NVML_VGPU_VM_COMPATIBILITY_LIVE, 'vGPU is runnable from a live/paused (ACPI S0)') + +class VgpuPgpuCompatibilityLimitCode(_FastEnum): + """ + vGPU-pGPU compatibility limit codes + + See `nvmlVgpuPgpuCompatibilityLimitCode_t`. + """ + VGPU_COMPATIBILITY_LIMIT_NONE = (NVML_VGPU_COMPATIBILITY_LIMIT_NONE, 'Compatibility is not limited.') + VGPU_COMPATIBILITY_LIMIT_HOST_DRIVER = (NVML_VGPU_COMPATIBILITY_LIMIT_HOST_DRIVER, 'ompatibility is limited by host driver version.') + VGPU_COMPATIBILITY_LIMIT_GUEST_DRIVER = (NVML_VGPU_COMPATIBILITY_LIMIT_GUEST_DRIVER, 'Compatibility is limited by guest driver version.') + VGPU_COMPATIBILITY_LIMIT_GPU = (NVML_VGPU_COMPATIBILITY_LIMIT_GPU, 'Compatibility is limited by GPU hardware.') + VGPU_COMPATIBILITY_LIMIT_OTHER = (NVML_VGPU_COMPATIBILITY_LIMIT_OTHER, 'Compatibility is limited by an undefined factor.') + +class GpmMetricId(_FastEnum): + """ + GPM Metric Identifiers + + See `nvmlGpmMetricId_t`. + """ + GPM_METRIC_GRAPHICS_UTIL = (NVML_GPM_METRIC_GRAPHICS_UTIL, 'Percentage of time any compute/graphics app was active on the GPU. 0.0 - 100.0.') + GPM_METRIC_SM_UTIL = (NVML_GPM_METRIC_SM_UTIL, 'Percentage of SMs that were busy. 0.0 - 100.0.') + GPM_METRIC_SM_OCCUPANCY = (NVML_GPM_METRIC_SM_OCCUPANCY, 'Percentage of warps that were active vs theoretical maximum. 0.0 - 100.0.') + GPM_METRIC_INTEGER_UTIL = (NVML_GPM_METRIC_INTEGER_UTIL, "Percentage of time the GPU's SMs were doing integer operations. 0.0 - 100.0.") + GPM_METRIC_ANY_TENSOR_UTIL = (NVML_GPM_METRIC_ANY_TENSOR_UTIL, "Percentage of time the GPU's SMs were doing ANY tensor operations. 0.0 - 100.0.") + GPM_METRIC_DFMA_TENSOR_UTIL = (NVML_GPM_METRIC_DFMA_TENSOR_UTIL, "Percentage of time the GPU's SMs were doing DFMA tensor operations. 0.0 - 100.0.") + GPM_METRIC_HMMA_TENSOR_UTIL = (NVML_GPM_METRIC_HMMA_TENSOR_UTIL, "Percentage of time the GPU's SMs were doing HMMA tensor operations. 0.0 - 100.0.") + GPM_METRIC_IMMA_TENSOR_UTIL = (NVML_GPM_METRIC_IMMA_TENSOR_UTIL, "Percentage of time the GPU's SMs were doing IMMA tensor operations. 0.0 - 100.0.") + GPM_METRIC_DRAM_BW_UTIL = (NVML_GPM_METRIC_DRAM_BW_UTIL, 'Percentage of DRAM bw used vs theoretical maximum. 0.0 - 100.0 *\u200d/.') + GPM_METRIC_FP64_UTIL = (NVML_GPM_METRIC_FP64_UTIL, "Percentage of time the GPU's SMs were doing non-tensor FP64 math. 0.0 - 100.0.") + GPM_METRIC_FP32_UTIL = (NVML_GPM_METRIC_FP32_UTIL, "Percentage of time the GPU's SMs were doing non-tensor FP32 math. 0.0 - 100.0.") + GPM_METRIC_FP16_UTIL = (NVML_GPM_METRIC_FP16_UTIL, "Percentage of time the GPU's SMs were doing non-tensor FP16 math. 0.0 - 100.0.") + GPM_METRIC_PCIE_TX_PER_SEC = (NVML_GPM_METRIC_PCIE_TX_PER_SEC, 'PCIe traffic from this GPU in MiB/sec.') + GPM_METRIC_PCIE_RX_PER_SEC = (NVML_GPM_METRIC_PCIE_RX_PER_SEC, 'PCIe traffic to this GPU in MiB/sec.') + GPM_METRIC_NVDEC_0_UTIL = (NVML_GPM_METRIC_NVDEC_0_UTIL, 'Percent utilization of NVDEC 0. 0.0 - 100.0.') + GPM_METRIC_NVDEC_1_UTIL = (NVML_GPM_METRIC_NVDEC_1_UTIL, 'Percent utilization of NVDEC 1. 0.0 - 100.0.') + GPM_METRIC_NVDEC_2_UTIL = (NVML_GPM_METRIC_NVDEC_2_UTIL, 'Percent utilization of NVDEC 2. 0.0 - 100.0.') + GPM_METRIC_NVDEC_3_UTIL = (NVML_GPM_METRIC_NVDEC_3_UTIL, 'Percent utilization of NVDEC 3. 0.0 - 100.0.') + GPM_METRIC_NVDEC_4_UTIL = (NVML_GPM_METRIC_NVDEC_4_UTIL, 'Percent utilization of NVDEC 4. 0.0 - 100.0.') + GPM_METRIC_NVDEC_5_UTIL = (NVML_GPM_METRIC_NVDEC_5_UTIL, 'Percent utilization of NVDEC 5. 0.0 - 100.0.') + GPM_METRIC_NVDEC_6_UTIL = (NVML_GPM_METRIC_NVDEC_6_UTIL, 'Percent utilization of NVDEC 6. 0.0 - 100.0.') + GPM_METRIC_NVDEC_7_UTIL = (NVML_GPM_METRIC_NVDEC_7_UTIL, 'Percent utilization of NVDEC 7. 0.0 - 100.0.') + GPM_METRIC_NVJPG_0_UTIL = (NVML_GPM_METRIC_NVJPG_0_UTIL, 'Percent utilization of NVJPG 0. 0.0 - 100.0.') + GPM_METRIC_NVJPG_1_UTIL = (NVML_GPM_METRIC_NVJPG_1_UTIL, 'Percent utilization of NVJPG 1. 0.0 - 100.0.') + GPM_METRIC_NVJPG_2_UTIL = (NVML_GPM_METRIC_NVJPG_2_UTIL, 'Percent utilization of NVJPG 2. 0.0 - 100.0.') + GPM_METRIC_NVJPG_3_UTIL = (NVML_GPM_METRIC_NVJPG_3_UTIL, 'Percent utilization of NVJPG 3. 0.0 - 100.0.') + GPM_METRIC_NVJPG_4_UTIL = (NVML_GPM_METRIC_NVJPG_4_UTIL, 'Percent utilization of NVJPG 4. 0.0 - 100.0.') + GPM_METRIC_NVJPG_5_UTIL = (NVML_GPM_METRIC_NVJPG_5_UTIL, 'Percent utilization of NVJPG 5. 0.0 - 100.0.') + GPM_METRIC_NVJPG_6_UTIL = (NVML_GPM_METRIC_NVJPG_6_UTIL, 'Percent utilization of NVJPG 6. 0.0 - 100.0.') + GPM_METRIC_NVJPG_7_UTIL = (NVML_GPM_METRIC_NVJPG_7_UTIL, 'Percent utilization of NVJPG 7. 0.0 - 100.0.') + GPM_METRIC_NVOFA_0_UTIL = (NVML_GPM_METRIC_NVOFA_0_UTIL, 'Percent utilization of NVOFA 0. 0.0 - 100.0.') + GPM_METRIC_NVOFA_1_UTIL = (NVML_GPM_METRIC_NVOFA_1_UTIL, 'Percent utilization of NVOFA 1. 0.0 - 100.0.') + GPM_METRIC_NVLINK_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_TOTAL_RX_PER_SEC, 'NvLink read bandwidth for all links in MiB/sec.') + GPM_METRIC_NVLINK_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_TOTAL_TX_PER_SEC, 'NvLink write bandwidth for all links in MiB/sec.') + GPM_METRIC_NVLINK_L0_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L0_RX_PER_SEC, 'NvLink read bandwidth for link 0 in MiB/sec.') + GPM_METRIC_NVLINK_L0_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L0_TX_PER_SEC, 'NvLink write bandwidth for link 0 in MiB/sec.') + GPM_METRIC_NVLINK_L1_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L1_RX_PER_SEC, 'NvLink read bandwidth for link 1 in MiB/sec.') + GPM_METRIC_NVLINK_L1_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L1_TX_PER_SEC, 'NvLink write bandwidth for link 1 in MiB/sec.') + GPM_METRIC_NVLINK_L2_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L2_RX_PER_SEC, 'NvLink read bandwidth for link 2 in MiB/sec.') + GPM_METRIC_NVLINK_L2_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L2_TX_PER_SEC, 'NvLink write bandwidth for link 2 in MiB/sec.') + GPM_METRIC_NVLINK_L3_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L3_RX_PER_SEC, 'NvLink read bandwidth for link 3 in MiB/sec.') + GPM_METRIC_NVLINK_L3_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L3_TX_PER_SEC, 'NvLink write bandwidth for link 3 in MiB/sec.') + GPM_METRIC_NVLINK_L4_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L4_RX_PER_SEC, 'NvLink read bandwidth for link 4 in MiB/sec.') + GPM_METRIC_NVLINK_L4_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L4_TX_PER_SEC, 'NvLink write bandwidth for link 4 in MiB/sec.') + GPM_METRIC_NVLINK_L5_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L5_RX_PER_SEC, 'NvLink read bandwidth for link 5 in MiB/sec.') + GPM_METRIC_NVLINK_L5_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L5_TX_PER_SEC, 'NvLink write bandwidth for link 5 in MiB/sec.') + GPM_METRIC_NVLINK_L6_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L6_RX_PER_SEC, 'NvLink read bandwidth for link 6 in MiB/sec.') + GPM_METRIC_NVLINK_L6_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L6_TX_PER_SEC, 'NvLink write bandwidth for link 6 in MiB/sec.') + GPM_METRIC_NVLINK_L7_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L7_RX_PER_SEC, 'NvLink read bandwidth for link 7 in MiB/sec.') + GPM_METRIC_NVLINK_L7_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L7_TX_PER_SEC, 'NvLink write bandwidth for link 7 in MiB/sec.') + GPM_METRIC_NVLINK_L8_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L8_RX_PER_SEC, 'NvLink read bandwidth for link 8 in MiB/sec.') + GPM_METRIC_NVLINK_L8_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L8_TX_PER_SEC, 'NvLink write bandwidth for link 8 in MiB/sec.') + GPM_METRIC_NVLINK_L9_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L9_RX_PER_SEC, 'NvLink read bandwidth for link 9 in MiB/sec.') + GPM_METRIC_NVLINK_L9_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L9_TX_PER_SEC, 'NvLink write bandwidth for link 9 in MiB/sec.') + GPM_METRIC_NVLINK_L10_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L10_RX_PER_SEC, 'NvLink read bandwidth for link 10 in MiB/sec.') + GPM_METRIC_NVLINK_L10_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L10_TX_PER_SEC, 'NvLink write bandwidth for link 10 in MiB/sec.') + GPM_METRIC_NVLINK_L11_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L11_RX_PER_SEC, 'NvLink read bandwidth for link 11 in MiB/sec.') + GPM_METRIC_NVLINK_L11_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L11_TX_PER_SEC, 'NvLink write bandwidth for link 11 in MiB/sec.') + GPM_METRIC_NVLINK_L12_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L12_RX_PER_SEC, 'NvLink read bandwidth for link 12 in MiB/sec.') + GPM_METRIC_NVLINK_L12_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L12_TX_PER_SEC, 'NvLink write bandwidth for link 12 in MiB/sec.') + GPM_METRIC_NVLINK_L13_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L13_RX_PER_SEC, 'NvLink read bandwidth for link 13 in MiB/sec.') + GPM_METRIC_NVLINK_L13_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L13_TX_PER_SEC, 'NvLink write bandwidth for link 13 in MiB/sec.') + GPM_METRIC_NVLINK_L14_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L14_RX_PER_SEC, 'NvLink read bandwidth for link 14 in MiB/sec.') + GPM_METRIC_NVLINK_L14_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L14_TX_PER_SEC, 'NvLink write bandwidth for link 14 in MiB/sec.') + GPM_METRIC_NVLINK_L15_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L15_RX_PER_SEC, 'NvLink read bandwidth for link 15 in MiB/sec.') + GPM_METRIC_NVLINK_L15_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L15_TX_PER_SEC, 'NvLink write bandwidth for link 15 in MiB/sec.') + GPM_METRIC_NVLINK_L16_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L16_RX_PER_SEC, 'NvLink read bandwidth for link 16 in MiB/sec.') + GPM_METRIC_NVLINK_L16_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L16_TX_PER_SEC, 'NvLink write bandwidth for link 16 in MiB/sec.') + GPM_METRIC_NVLINK_L17_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L17_RX_PER_SEC, 'NvLink read bandwidth for link 17 in MiB/sec.') + GPM_METRIC_NVLINK_L17_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L17_TX_PER_SEC, 'NvLink write bandwidth for link 17 in MiB/sec.') GPM_METRIC_C2C_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_TOTAL_TX_PER_SEC GPM_METRIC_C2C_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_TOTAL_RX_PER_SEC GPM_METRIC_C2C_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_DATA_TX_PER_SEC @@ -733,10 +966,12 @@ class GpmMetricId(_IntEnum): GPM_METRIC_GR7_CTXSW_REQUESTS = NVML_GPM_METRIC_GR7_CTXSW_REQUESTS GPM_METRIC_GR7_CTXSW_CYCLES_PER_REQ = NVML_GPM_METRIC_GR7_CTXSW_CYCLES_PER_REQ GPM_METRIC_GR7_CTXSW_ACTIVE_PCT = NVML_GPM_METRIC_GR7_CTXSW_ACTIVE_PCT - GPM_METRIC_MAX = NVML_GPM_METRIC_MAX + GPM_METRIC_MAX = (NVML_GPM_METRIC_MAX, 'Maximum value above +1. Note that changing this should also change NVML_GPM_METRICS_GET_VERSION due to struct size change.') -class PowerProfileType(_IntEnum): - """See `nvmlPowerProfileType_t`.""" +class PowerProfileType(_FastEnum): + """ + See `nvmlPowerProfileType_t`. + """ POWER_PROFILE_MAX_P = NVML_POWER_PROFILE_MAX_P POWER_PROFILE_MAX_Q = NVML_POWER_PROFILE_MAX_Q POWER_PROFILE_COMPUTE = NVML_POWER_PROFILE_COMPUTE @@ -754,14 +989,22 @@ class PowerProfileType(_IntEnum): POWER_PROFILE_MIG = NVML_POWER_PROFILE_MIG POWER_PROFILE_MAX = NVML_POWER_PROFILE_MAX -class DeviceAddressingModeType(_IntEnum): - """See `nvmlDeviceAddressingModeType_t`.""" - DEVICE_ADDRESSING_MODE_NONE = NVML_DEVICE_ADDRESSING_MODE_NONE - DEVICE_ADDRESSING_MODE_HMM = NVML_DEVICE_ADDRESSING_MODE_HMM - DEVICE_ADDRESSING_MODE_ATS = NVML_DEVICE_ADDRESSING_MODE_ATS +class DeviceAddressingModeType(_FastEnum): + """ + Enum to represent device addressing mode values + + See `nvmlDeviceAddressingModeType_t`. + """ + DEVICE_ADDRESSING_MODE_NONE = (NVML_DEVICE_ADDRESSING_MODE_NONE, 'No active mode.') + DEVICE_ADDRESSING_MODE_HMM = (NVML_DEVICE_ADDRESSING_MODE_HMM, 'Heterogeneous Memory Management mode.') + DEVICE_ADDRESSING_MODE_ATS = (NVML_DEVICE_ADDRESSING_MODE_ATS, 'Address Translation Services mode.') + +class PRMCounterId(_FastEnum): + """ + PRM Counter IDs -class PRMCounterId(_IntEnum): - """See `nvmlPRMCounterId_t`.""" + See `nvmlPRMCounterId_t`. + """ NONE = NVML_PRM_COUNTER_ID_NONE PPCNT_PHYSICAL_LAYER_CTRS_LINK_DOWN_EVENTS = NVML_PRM_COUNTER_ID_PPCNT_PHYSICAL_LAYER_CTRS_LINK_DOWN_EVENTS PPCNT_PHYSICAL_LAYER_CTRS_SUCCESSFUL_RECOVERY_EVENTS = NVML_PRM_COUNTER_ID_PPCNT_PHYSICAL_LAYER_CTRS_SUCCESSFUL_RECOVERY_EVENTS @@ -778,430 +1021,430 @@ class PRMCounterId(_IntEnum): PPCNT_PLR_SYNC_EVENTS = NVML_PRM_COUNTER_ID_PPCNT_PLR_SYNC_EVENTS PPRM_OPER_RECOVERY = NVML_PRM_COUNTER_ID_PPRM_OPER_RECOVERY -class PowerProfileOperation(_IntEnum): - """See `nvmlPowerProfileOperation_t`.""" - CLEAR = NVML_POWER_PROFILE_OPERATION_CLEAR - SET = NVML_POWER_PROFILE_OPERATION_SET - SET_AND_OVERWRITE = NVML_POWER_PROFILE_OPERATION_SET_AND_OVERWRITE - MAX = NVML_POWER_PROFILE_OPERATION_MAX +class PowerProfileOperation(_FastEnum): + """ + Enum for operation to perform on the requested profiles + + See `nvmlPowerProfileOperation_t`. + """ + CLEAR = (NVML_POWER_PROFILE_OPERATION_CLEAR, 'Remove the requested profiles from the existing list of requested profiles.') + SET = (NVML_POWER_PROFILE_OPERATION_SET, 'Add the requested profiles to the existing list of requested profiles.') + SET_AND_OVERWRITE = (NVML_POWER_PROFILE_OPERATION_SET_AND_OVERWRITE, 'Overwrite the existing list of requested profiles with just the requested profiles.') + MAX = (NVML_POWER_PROFILE_OPERATION_MAX, 'Max value above +1.') -class AffinityScope(_IntEnum): - NODE = 0 # Scope of NUMA node for affinity queries - SOCKET = 1 # Scope of processor socket for affinity queries +class AffinityScope(_FastEnum): + NODE = (0, "Scope of NUMA node for affinity queries") + SOCKET = (1, "Scope of processor socket for affinity queries") -class FieldId(_IntEnum): - DEV_ECC_CURRENT = 1 # Current ECC mode. 1=Active. 0=Inactive - DEV_ECC_PENDING = 2 # Pending ECC mode. 1=Active. 0=Inactive +class FieldId(_FastEnum): + DEV_ECC_CURRENT = (1, "Current ECC mode. 1=Active. 0=Inactive") + DEV_ECC_PENDING = (2, "Pending ECC mode. 1=Active. 0=Inactive") # ECC Count Totals - DEV_ECC_SBE_VOL_TOTAL = 3 # Total single bit volatile ECC errors - DEV_ECC_DBE_VOL_TOTAL = 4 # Total double bit volatile ECC errors - DEV_ECC_SBE_AGG_TOTAL = 5 # Total single bit aggregate (persistent) ECC errors - DEV_ECC_DBE_AGG_TOTAL = 6 # Total double bit aggregate (persistent) ECC errors + DEV_ECC_SBE_VOL_TOTAL = (3, "Total single bit volatile ECC errors") + DEV_ECC_DBE_VOL_TOTAL = (4, "Total double bit volatile ECC errors") + DEV_ECC_SBE_AGG_TOTAL = (5, "Total single bit aggregate (persistent) ECC errors") + DEV_ECC_DBE_AGG_TOTAL = (6, "Total double bit aggregate (persistent) ECC errors") # Individual ECC locations - DEV_ECC_SBE_VOL_L1 = 7 # L1 cache single bit volatile ECC errors - DEV_ECC_DBE_VOL_L1 = 8 # L1 cache double bit volatile ECC errors - DEV_ECC_SBE_VOL_L2 = 9 # L2 cache single bit volatile ECC errors - DEV_ECC_DBE_VOL_L2 = 10 # L2 cache double bit volatile ECC errors - DEV_ECC_SBE_VOL_DEV = 11 # Device memory single bit volatile ECC errors - DEV_ECC_DBE_VOL_DEV = 12 # Device memory double bit volatile ECC errors - DEV_ECC_SBE_VOL_REG = 13 # Register file single bit volatile ECC errors - DEV_ECC_DBE_VOL_REG = 14 # Register file double bit volatile ECC errors - DEV_ECC_SBE_VOL_TEX = 15 # Texture memory single bit volatile ECC errors - DEV_ECC_DBE_VOL_TEX = 16 # Texture memory double bit volatile ECC errors - DEV_ECC_DBE_VOL_CBU = 17 # CBU double bit volatile ECC errors - DEV_ECC_SBE_AGG_L1 = 18 # L1 cache single bit aggregate (persistent) ECC errors - DEV_ECC_DBE_AGG_L1 = 19 # L1 cache double bit aggregate (persistent) ECC errors - DEV_ECC_SBE_AGG_L2 = 20 # L2 cache single bit aggregate (persistent) ECC errors - DEV_ECC_DBE_AGG_L2 = 21 # L2 cache double bit aggregate (persistent) ECC errors - DEV_ECC_SBE_AGG_DEV = 22 # Device memory single bit aggregate (persistent) ECC errors - DEV_ECC_DBE_AGG_DEV = 23 # Device memory double bit aggregate (persistent) ECC errors - DEV_ECC_SBE_AGG_REG = 24 # Register File single bit aggregate (persistent) ECC errors - DEV_ECC_DBE_AGG_REG = 25 # Register File double bit aggregate (persistent) ECC errors - DEV_ECC_SBE_AGG_TEX = 26 # Texture memory single bit aggregate (persistent) ECC errors - DEV_ECC_DBE_AGG_TEX = 27 # Texture memory double bit aggregate (persistent) ECC errors - DEV_ECC_DBE_AGG_CBU = 28 # CBU double bit aggregate ECC errors + DEV_ECC_SBE_VOL_L1 = (7, "L1 cache single bit volatile ECC errors") + DEV_ECC_DBE_VOL_L1 = (8, "L1 cache double bit volatile ECC errors") + DEV_ECC_SBE_VOL_L2 = (9, "L2 cache single bit volatile ECC errors") + DEV_ECC_DBE_VOL_L2 = (10, "L2 cache double bit volatile ECC errors") + DEV_ECC_SBE_VOL_DEV = (11, "Device memory single bit volatile ECC errors") + DEV_ECC_DBE_VOL_DEV = (12, "Device memory double bit volatile ECC errors") + DEV_ECC_SBE_VOL_REG = (13, "Register file single bit volatile ECC errors") + DEV_ECC_DBE_VOL_REG = (14, "Register file double bit volatile ECC errors") + DEV_ECC_SBE_VOL_TEX = (15, "Texture memory single bit volatile ECC errors") + DEV_ECC_DBE_VOL_TEX = (16, "Texture memory double bit volatile ECC errors") + DEV_ECC_DBE_VOL_CBU = (17, "CBU double bit volatile ECC errors") + DEV_ECC_SBE_AGG_L1 = (18, "L1 cache single bit aggregate (persistent) ECC errors") + DEV_ECC_DBE_AGG_L1 = (19, "L1 cache double bit aggregate (persistent) ECC errors") + DEV_ECC_SBE_AGG_L2 = (20, "L2 cache single bit aggregate (persistent) ECC errors") + DEV_ECC_DBE_AGG_L2 = (21, "L2 cache double bit aggregate (persistent) ECC errors") + DEV_ECC_SBE_AGG_DEV = (22, "Device memory single bit aggregate (persistent) ECC errors") + DEV_ECC_DBE_AGG_DEV = (23, "Device memory double bit aggregate (persistent) ECC errors") + DEV_ECC_SBE_AGG_REG = (24, "Register File single bit aggregate (persistent) ECC errors") + DEV_ECC_DBE_AGG_REG = (25, "Register File double bit aggregate (persistent) ECC errors") + DEV_ECC_SBE_AGG_TEX = (26, "Texture memory single bit aggregate (persistent) ECC errors") + DEV_ECC_DBE_AGG_TEX = (27, "Texture memory double bit aggregate (persistent) ECC errors") + DEV_ECC_DBE_AGG_CBU = (28, "CBU double bit aggregate ECC errors") # Page Retirement - DEV_RETIRED_SBE = 29 # Number of retired pages because of single bit errors - DEV_RETIRED_DBE = 30 # Number of retired pages because of double bit errors - DEV_RETIRED_PENDING = 31 # If any pages are pending retirement. 1=yes. 0=no. - + DEV_RETIRED_SBE = (29, "Number of retired pages because of single bit errors") + DEV_RETIRED_DBE = (30, "Number of retired pages because of double bit errors") + DEV_RETIRED_PENDING = (31, "If any pages are pending retirement. 1=yes. 0=no.") # NVLink Flit Error Counters - DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L0 = 32 # NVLink flow control CRC Error Counter for Lane 0 - DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L1 = 33 # NVLink flow control CRC Error Counter for Lane 1 - DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L2 = 34 # NVLink flow control CRC Error Counter for Lane 2 - DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L3 = 35 # NVLink flow control CRC Error Counter for Lane 3 - DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L4 = 36 # NVLink flow control CRC Error Counter for Lane 4 - DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L5 = 37 # NVLink flow control CRC Error Counter for Lane 5 - DEV_NVLINK_CRC_FLIT_ERROR_COUNT_TOTAL =38 # NVLink flow control CRC Error Counter total for all Lanes + DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L0 = (32, "NVLink flow control CRC Error Counter for Lane 0") + DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L1 = (33, "NVLink flow control CRC Error Counter for Lane 1") + DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L2 = (34, "NVLink flow control CRC Error Counter for Lane 2") + DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L3 = (35, "NVLink flow control CRC Error Counter for Lane 3") + DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L4 = (36, "NVLink flow control CRC Error Counter for Lane 4") + DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L5 = (37, "NVLink flow control CRC Error Counter for Lane 5") + DEV_NVLINK_CRC_FLIT_ERROR_COUNT_TOTAL = (38, "NVLink flow control CRC Error Counter total for all Lanes") # NVLink CRC Data Error Counters - DEV_NVLINK_CRC_DATA_ERROR_COUNT_L0 = 39 # NVLink data CRC Error Counter for Lane 0 - DEV_NVLINK_CRC_DATA_ERROR_COUNT_L1 = 40 # NVLink data CRC Error Counter for Lane 1 - DEV_NVLINK_CRC_DATA_ERROR_COUNT_L2 = 41 # NVLink data CRC Error Counter for Lane 2 - DEV_NVLINK_CRC_DATA_ERROR_COUNT_L3 = 42 # NVLink data CRC Error Counter for Lane 3 - DEV_NVLINK_CRC_DATA_ERROR_COUNT_L4 = 43 # NVLink data CRC Error Counter for Lane 4 - DEV_NVLINK_CRC_DATA_ERROR_COUNT_L5 = 44 # NVLink data CRC Error Counter for Lane 5 - DEV_NVLINK_CRC_DATA_ERROR_COUNT_TOTAL =45 # NvLink data CRC Error Counter total for all Lanes - + DEV_NVLINK_CRC_DATA_ERROR_COUNT_L0 = (39, "NVLink data CRC Error Counter for Lane 0") + DEV_NVLINK_CRC_DATA_ERROR_COUNT_L1 = (40, "NVLink data CRC Error Counter for Lane 1") + DEV_NVLINK_CRC_DATA_ERROR_COUNT_L2 = (41, "NVLink data CRC Error Counter for Lane 2") + DEV_NVLINK_CRC_DATA_ERROR_COUNT_L3 = (42, "NVLink data CRC Error Counter for Lane 3") + DEV_NVLINK_CRC_DATA_ERROR_COUNT_L4 = (43, "NVLink data CRC Error Counter for Lane 4") + DEV_NVLINK_CRC_DATA_ERROR_COUNT_L5 = (44, "NVLink data CRC Error Counter for Lane 5") + DEV_NVLINK_CRC_DATA_ERROR_COUNT_TOTAL = (45, "NvLink data CRC Error Counter total for all Lanes") # NVLink Replay Error Counters - DEV_NVLINK_REPLAY_ERROR_COUNT_L0 = 46 # NVLink Replay Error Counter for Lane 0 - DEV_NVLINK_REPLAY_ERROR_COUNT_L1 = 47 # NVLink Replay Error Counter for Lane 1 - DEV_NVLINK_REPLAY_ERROR_COUNT_L2 = 48 # NVLink Replay Error Counter for Lane 2 - DEV_NVLINK_REPLAY_ERROR_COUNT_L3 = 49 # NVLink Replay Error Counter for Lane 3 - DEV_NVLINK_REPLAY_ERROR_COUNT_L4 = 50 # NVLink Replay Error Counter for Lane 4 - DEV_NVLINK_REPLAY_ERROR_COUNT_L5 = 51 # NVLink Replay Error Counter for Lane 5 - DEV_NVLINK_REPLAY_ERROR_COUNT_TOTAL = 52 # NVLink Replay Error Counter total for all Lanes + DEV_NVLINK_REPLAY_ERROR_COUNT_L0 = (46, "NVLink Replay Error Counter for Lane 0") + DEV_NVLINK_REPLAY_ERROR_COUNT_L1 = (47, "NVLink Replay Error Counter for Lane 1") + DEV_NVLINK_REPLAY_ERROR_COUNT_L2 = (48, "NVLink Replay Error Counter for Lane 2") + DEV_NVLINK_REPLAY_ERROR_COUNT_L3 = (49, "NVLink Replay Error Counter for Lane 3") + DEV_NVLINK_REPLAY_ERROR_COUNT_L4 = (50, "NVLink Replay Error Counter for Lane 4") + DEV_NVLINK_REPLAY_ERROR_COUNT_L5 = (51, "NVLink Replay Error Counter for Lane 5") + DEV_NVLINK_REPLAY_ERROR_COUNT_TOTAL = (52, "NVLink Replay Error Counter total for all Lanes") # NVLink Recovery Error Counters - DEV_NVLINK_RECOVERY_ERROR_COUNT_L0 = 53 # NVLink Recovery Error Counter for Lane 0 - DEV_NVLINK_RECOVERY_ERROR_COUNT_L1 = 54 # NVLink Recovery Error Counter for Lane 1 - DEV_NVLINK_RECOVERY_ERROR_COUNT_L2 = 55 # NVLink Recovery Error Counter for Lane 2 - DEV_NVLINK_RECOVERY_ERROR_COUNT_L3 = 56 # NVLink Recovery Error Counter for Lane 3 - DEV_NVLINK_RECOVERY_ERROR_COUNT_L4 = 57 # NVLink Recovery Error Counter for Lane 4 - DEV_NVLINK_RECOVERY_ERROR_COUNT_L5 = 58 # NVLink Recovery Error Counter for Lane 5 - DEV_NVLINK_RECOVERY_ERROR_COUNT_TOTAL =59 # NVLink Recovery Error Counter total for all Lanes + DEV_NVLINK_RECOVERY_ERROR_COUNT_L0 = (53, "NVLink Recovery Error Counter for Lane 0") + DEV_NVLINK_RECOVERY_ERROR_COUNT_L1 = (54, "NVLink Recovery Error Counter for Lane 1") + DEV_NVLINK_RECOVERY_ERROR_COUNT_L2 = (55, "NVLink Recovery Error Counter for Lane 2") + DEV_NVLINK_RECOVERY_ERROR_COUNT_L3 = (56, "NVLink Recovery Error Counter for Lane 3") + DEV_NVLINK_RECOVERY_ERROR_COUNT_L4 = (57, "NVLink Recovery Error Counter for Lane 4") + DEV_NVLINK_RECOVERY_ERROR_COUNT_L5 = (58, "NVLink Recovery Error Counter for Lane 5") + DEV_NVLINK_RECOVERY_ERROR_COUNT_TOTAL = (59, "NVLink Recovery Error Counter total for all Lanes") # NvLink Bandwidth Counters - DEV_NVLINK_BANDWIDTH_C0_L0 = 60 # NVLink Bandwidth Counter for Counter Set 0, Lane 0 - DEV_NVLINK_BANDWIDTH_C0_L1 = 61 # NVLink Bandwidth Counter for Counter Set 0, Lane 1 - DEV_NVLINK_BANDWIDTH_C0_L2 = 62 # NVLink Bandwidth Counter for Counter Set 0, Lane 2 - DEV_NVLINK_BANDWIDTH_C0_L3 = 63 # NVLink Bandwidth Counter for Counter Set 0, Lane 3 - DEV_NVLINK_BANDWIDTH_C0_L4 = 64 # NVLink Bandwidth Counter for Counter Set 0, Lane 4 - DEV_NVLINK_BANDWIDTH_C0_L5 = 65 # NVLink Bandwidth Counter for Counter Set 0, Lane 5 - DEV_NVLINK_BANDWIDTH_C0_TOTAL = 66 # NVLink Bandwidth Counter Total for Counter Set 0, All Lanes + DEV_NVLINK_BANDWIDTH_C0_L0 = (60, "NVLink Bandwidth Counter for Counter Set 0, Lane 0") + DEV_NVLINK_BANDWIDTH_C0_L1 = (61, "NVLink Bandwidth Counter for Counter Set 0, Lane 1") + DEV_NVLINK_BANDWIDTH_C0_L2 = (62, "NVLink Bandwidth Counter for Counter Set 0, Lane 2") + DEV_NVLINK_BANDWIDTH_C0_L3 = (63, "NVLink Bandwidth Counter for Counter Set 0, Lane 3") + DEV_NVLINK_BANDWIDTH_C0_L4 = (64, "NVLink Bandwidth Counter for Counter Set 0, Lane 4") + DEV_NVLINK_BANDWIDTH_C0_L5 = (65, "NVLink Bandwidth Counter for Counter Set 0, Lane 5") + DEV_NVLINK_BANDWIDTH_C0_TOTAL = (66, "NVLink Bandwidth Counter Total for Counter Set 0, All Lanes") # NvLink Bandwidth Counters - DEV_NVLINK_BANDWIDTH_C1_L0 = 67 # NVLink Bandwidth Counter for Counter Set 1, Lane 0 - DEV_NVLINK_BANDWIDTH_C1_L1 = 68 # NVLink Bandwidth Counter for Counter Set 1, Lane 1 - DEV_NVLINK_BANDWIDTH_C1_L2 = 69 # NVLink Bandwidth Counter for Counter Set 1, Lane 2 - DEV_NVLINK_BANDWIDTH_C1_L3 = 70 # NVLink Bandwidth Counter for Counter Set 1, Lane 3 - DEV_NVLINK_BANDWIDTH_C1_L4 = 71 # NVLink Bandwidth Counter for Counter Set 1, Lane 4 - DEV_NVLINK_BANDWIDTH_C1_L5 = 72 # NVLink Bandwidth Counter for Counter Set 1, Lane 5 - DEV_NVLINK_BANDWIDTH_C1_TOTAL = 73 # NVLink Bandwidth Counter Total for Counter Set 1, All Lanes + DEV_NVLINK_BANDWIDTH_C1_L0 = (67, "NVLink Bandwidth Counter for Counter Set 1, Lane 0") + DEV_NVLINK_BANDWIDTH_C1_L1 = (68, "NVLink Bandwidth Counter for Counter Set 1, Lane 1") + DEV_NVLINK_BANDWIDTH_C1_L2 = (69, "NVLink Bandwidth Counter for Counter Set 1, Lane 2") + DEV_NVLINK_BANDWIDTH_C1_L3 = (70, "NVLink Bandwidth Counter for Counter Set 1, Lane 3") + DEV_NVLINK_BANDWIDTH_C1_L4 = (71, "NVLink Bandwidth Counter for Counter Set 1, Lane 4") + DEV_NVLINK_BANDWIDTH_C1_L5 = (72, "NVLink Bandwidth Counter for Counter Set 1, Lane 5") + DEV_NVLINK_BANDWIDTH_C1_TOTAL = (73, "NVLink Bandwidth Counter Total for Counter Set 1, All Lanes") # NVML Perf Policy Counters - DEV_PERF_POLICY_POWER = 74 # Perf Policy Counter for Power Policy - DEV_PERF_POLICY_THERMAL = 75 # Perf Policy Counter for Thermal Policy - DEV_PERF_POLICY_SYNC_BOOST = 76 # Perf Policy Counter for Sync boost Policy - DEV_PERF_POLICY_BOARD_LIMIT = 77 # Perf Policy Counter for Board Limit - DEV_PERF_POLICY_LOW_UTILIZATION = 78 # Perf Policy Counter for Low GPU Utilization Policy - DEV_PERF_POLICY_RELIABILITY = 79 # Perf Policy Counter for Reliability Policy - DEV_PERF_POLICY_TOTAL_APP_CLOCKS = 80 # Perf Policy Counter for Total App Clock Policy - DEV_PERF_POLICY_TOTAL_BASE_CLOCKS = 81 # Perf Policy Counter for Total Base Clocks Policy + DEV_PERF_POLICY_POWER = (74, "Perf Policy Counter for Power Policy") + DEV_PERF_POLICY_THERMAL = (75, "Perf Policy Counter for Thermal Policy") + DEV_PERF_POLICY_SYNC_BOOST = (76, "Perf Policy Counter for Sync boost Policy") + DEV_PERF_POLICY_BOARD_LIMIT = (77, "Perf Policy Counter for Board Limit") + DEV_PERF_POLICY_LOW_UTILIZATION = (78, "Perf Policy Counter for Low GPU Utilization Policy") + DEV_PERF_POLICY_RELIABILITY = (79, "Perf Policy Counter for Reliability Policy") + DEV_PERF_POLICY_TOTAL_APP_CLOCKS = (80, "Perf Policy Counter for Total App Clock Policy") + DEV_PERF_POLICY_TOTAL_BASE_CLOCKS = (81, "Perf Policy Counter for Total Base Clocks Policy") # Memory temperatures - DEV_MEMORY_TEMP = 82 # Memory temperature for the device + DEV_MEMORY_TEMP = (82, "Memory temperature for the device") # Energy Counter - DEV_TOTAL_ENERGY_CONSUMPTION =83 # Total energy consumption for the GPU in mJ since the driver was last reloaded + DEV_TOTAL_ENERGY_CONSUMPTION = (83, "Total energy consumption for the GPU in mJ since the driver was last reloaded") # NVLink Speed - DEV_NVLINK_SPEED_MBPS_L0 = 84 # NVLink Speed in MBps for Link 0 - DEV_NVLINK_SPEED_MBPS_L1 = 85 # NVLink Speed in MBps for Link 1 - DEV_NVLINK_SPEED_MBPS_L2 = 86 # NVLink Speed in MBps for Link 2 - DEV_NVLINK_SPEED_MBPS_L3 = 87 # NVLink Speed in MBps for Link 3 - DEV_NVLINK_SPEED_MBPS_L4 = 88 # NVLink Speed in MBps for Link 4 - DEV_NVLINK_SPEED_MBPS_L5 = 89 # NVLink Speed in MBps for Link 5 - DEV_NVLINK_SPEED_MBPS_COMMON =90 # Common NVLink Speed in MBps for active links + DEV_NVLINK_SPEED_MBPS_L0 = (84, "NVLink Speed in MBps for Link 0") + DEV_NVLINK_SPEED_MBPS_L1 = (85, "NVLink Speed in MBps for Link 1") + DEV_NVLINK_SPEED_MBPS_L2 = (86, "NVLink Speed in MBps for Link 2") + DEV_NVLINK_SPEED_MBPS_L3 = (87, "NVLink Speed in MBps for Link 3") + DEV_NVLINK_SPEED_MBPS_L4 = (88, "NVLink Speed in MBps for Link 4") + DEV_NVLINK_SPEED_MBPS_L5 = (89, "NVLink Speed in MBps for Link 5") + DEV_NVLINK_SPEED_MBPS_COMMON = (90, "Common NVLink Speed in MBps for active links") - DEV_NVLINK_LINK_COUNT = 91 # Number of NVLinks present on the device + DEV_NVLINK_LINK_COUNT = (91, "Number of NVLinks present on the device") - DEV_RETIRED_PENDING_SBE = 92 # If any pages are pending retirement due to SBE. 1=yes. 0=no. - DEV_RETIRED_PENDING_DBE = 93 # If any pages are pending retirement due to DBE. 1=yes. 0=no. + DEV_RETIRED_PENDING_SBE = (92, "If any pages are pending retirement due to SBE. 1=yes. 0=no.") + DEV_RETIRED_PENDING_DBE = (93, "If any pages are pending retirement due to DBE. 1=yes. 0=no.") - DEV_PCIE_REPLAY_COUNTER = 94 # PCIe replay counter - DEV_PCIE_REPLAY_ROLLOVER_COUNTER = 95 # PCIe replay rollover counter + DEV_PCIE_REPLAY_COUNTER = (94, "PCIe replay counter") + DEV_PCIE_REPLAY_ROLLOVER_COUNTER = (95, "PCIe replay rollover counter") # NVLink Flit Error Counters - DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L6 = 96 # NVLink flow control CRC Error Counter for Lane 6 - DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L7 = 97 # NVLink flow control CRC Error Counter for Lane 7 - DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L8 = 98 # NVLink flow control CRC Error Counter for Lane 8 - DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L9 = 99 # NVLink flow control CRC Error Counter for Lane 9 - DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L10 = 100 # NVLink flow control CRC Error Counter for Lane 10 - DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L11 = 101 # NVLink flow control CRC Error Counter for Lane 11 + DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L6 = (96, "NVLink flow control CRC Error Counter for Lane 6") + DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L7 = (97, "NVLink flow control CRC Error Counter for Lane 7") + DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L8 = (98, "NVLink flow control CRC Error Counter for Lane 8") + DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L9 = (99, "NVLink flow control CRC Error Counter for Lane 9") + DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L10 = (100, "NVLink flow control CRC Error Counter for Lane 10") + DEV_NVLINK_CRC_FLIT_ERROR_COUNT_L11 = (101, "NVLink flow control CRC Error Counter for Lane 11") # NVLink CRC Data Error Counters - DEV_NVLINK_CRC_DATA_ERROR_COUNT_L6 = 102 # NVLink data CRC Error Counter for Lane 6 - DEV_NVLINK_CRC_DATA_ERROR_COUNT_L7 = 103 # NVLink data CRC Error Counter for Lane 7 - DEV_NVLINK_CRC_DATA_ERROR_COUNT_L8 = 104 # NVLink data CRC Error Counter for Lane 8 - DEV_NVLINK_CRC_DATA_ERROR_COUNT_L9 = 105 # NVLink data CRC Error Counter for Lane 9 - DEV_NVLINK_CRC_DATA_ERROR_COUNT_L10 = 106 # NVLink data CRC Error Counter for Lane 10 - DEV_NVLINK_CRC_DATA_ERROR_COUNT_L11 = 107 # NVLink data CRC Error Counter for Lane 11 + DEV_NVLINK_CRC_DATA_ERROR_COUNT_L6 = (102, "NVLink data CRC Error Counter for Lane 6") + DEV_NVLINK_CRC_DATA_ERROR_COUNT_L7 = (103, "NVLink data CRC Error Counter for Lane 7") + DEV_NVLINK_CRC_DATA_ERROR_COUNT_L8 = (104, "NVLink data CRC Error Counter for Lane 8") + DEV_NVLINK_CRC_DATA_ERROR_COUNT_L9 = (105, "NVLink data CRC Error Counter for Lane 9") + DEV_NVLINK_CRC_DATA_ERROR_COUNT_L10 = (106, "NVLink data CRC Error Counter for Lane 10") + DEV_NVLINK_CRC_DATA_ERROR_COUNT_L11 = (107, "NVLink data CRC Error Counter for Lane 11") # NVLink Replay Error Counters - DEV_NVLINK_REPLAY_ERROR_COUNT_L6 = 108 # NVLink Replay Error Counter for Lane 6 - DEV_NVLINK_REPLAY_ERROR_COUNT_L7 = 109 # NVLink Replay Error Counter for Lane 7 - DEV_NVLINK_REPLAY_ERROR_COUNT_L8 = 110 # NVLink Replay Error Counter for Lane 8 - DEV_NVLINK_REPLAY_ERROR_COUNT_L9 = 111 # NVLink Replay Error Counter for Lane 9 - DEV_NVLINK_REPLAY_ERROR_COUNT_L10 = 112 # NVLink Replay Error Counter for Lane 10 - DEV_NVLINK_REPLAY_ERROR_COUNT_L11 = 113 # NVLink Replay Error Counter for Lane 11 + DEV_NVLINK_REPLAY_ERROR_COUNT_L6 = (108, "NVLink Replay Error Counter for Lane 6") + DEV_NVLINK_REPLAY_ERROR_COUNT_L7 = (109, "NVLink Replay Error Counter for Lane 7") + DEV_NVLINK_REPLAY_ERROR_COUNT_L8 = (110, "NVLink Replay Error Counter for Lane 8") + DEV_NVLINK_REPLAY_ERROR_COUNT_L9 = (111, "NVLink Replay Error Counter for Lane 9") + DEV_NVLINK_REPLAY_ERROR_COUNT_L10 = (112, "NVLink Replay Error Counter for Lane 10") + DEV_NVLINK_REPLAY_ERROR_COUNT_L11 = (113, "NVLink Replay Error Counter for Lane 11") # NVLink Recovery Error Counters - DEV_NVLINK_RECOVERY_ERROR_COUNT_L6 = 114 # NVLink Recovery Error Counter for Lane 6 - DEV_NVLINK_RECOVERY_ERROR_COUNT_L7 = 115 # NVLink Recovery Error Counter for Lane 7 - DEV_NVLINK_RECOVERY_ERROR_COUNT_L8 = 116 # NVLink Recovery Error Counter for Lane 8 - DEV_NVLINK_RECOVERY_ERROR_COUNT_L9 = 117 # NVLink Recovery Error Counter for Lane 9 - DEV_NVLINK_RECOVERY_ERROR_COUNT_L10 = 118 # NVLink Recovery Error Counter for Lane 10 - DEV_NVLINK_RECOVERY_ERROR_COUNT_L11 = 119 # NVLink Recovery Error Counter for Lane 11 + DEV_NVLINK_RECOVERY_ERROR_COUNT_L6 = (114, "NVLink Recovery Error Counter for Lane 6") + DEV_NVLINK_RECOVERY_ERROR_COUNT_L7 = (115, "NVLink Recovery Error Counter for Lane 7") + DEV_NVLINK_RECOVERY_ERROR_COUNT_L8 = (116, "NVLink Recovery Error Counter for Lane 8") + DEV_NVLINK_RECOVERY_ERROR_COUNT_L9 = (117, "NVLink Recovery Error Counter for Lane 9") + DEV_NVLINK_RECOVERY_ERROR_COUNT_L10 = (118, "NVLink Recovery Error Counter for Lane 10") + DEV_NVLINK_RECOVERY_ERROR_COUNT_L11 = (119, "NVLink Recovery Error Counter for Lane 11") # NvLink Bandwidth Counters */ - DEV_NVLINK_BANDWIDTH_C0_L6 = 120 # NVLink Bandwidth Counter for Counter Set 0, Lane 6 - DEV_NVLINK_BANDWIDTH_C0_L7 = 121 # NVLink Bandwidth Counter for Counter Set 0, Lane 7 - DEV_NVLINK_BANDWIDTH_C0_L8 = 122 # NVLink Bandwidth Counter for Counter Set 0, Lane 8 - DEV_NVLINK_BANDWIDTH_C0_L9 = 123 # NVLink Bandwidth Counter for Counter Set 0, Lane 9 - DEV_NVLINK_BANDWIDTH_C0_L10 = 124 # NVLink Bandwidth Counter for Counter Set 0, Lane 10 - DEV_NVLINK_BANDWIDTH_C0_L11 = 125 # NVLink Bandwidth Counter for Counter Set 0, Lane 11 + DEV_NVLINK_BANDWIDTH_C0_L6 = (120, "NVLink Bandwidth Counter for Counter Set 0, Lane 6") + DEV_NVLINK_BANDWIDTH_C0_L7 = (121, "NVLink Bandwidth Counter for Counter Set 0, Lane 7") + DEV_NVLINK_BANDWIDTH_C0_L8 = (122, "NVLink Bandwidth Counter for Counter Set 0, Lane 8") + DEV_NVLINK_BANDWIDTH_C0_L9 = (123, "NVLink Bandwidth Counter for Counter Set 0, Lane 9") + DEV_NVLINK_BANDWIDTH_C0_L10 = (124, "NVLink Bandwidth Counter for Counter Set 0, Lane 10") + DEV_NVLINK_BANDWIDTH_C0_L11 = (125, "NVLink Bandwidth Counter for Counter Set 0, Lane 11") # NvLink Bandwidth Counters - DEV_NVLINK_BANDWIDTH_C1_L6 = 126 # NVLink Bandwidth Counter for Counter Set 1, Lane 6 - DEV_NVLINK_BANDWIDTH_C1_L7 = 127 # NVLink Bandwidth Counter for Counter Set 1, Lane 7 - DEV_NVLINK_BANDWIDTH_C1_L8 = 128 # NVLink Bandwidth Counter for Counter Set 1, Lane 8 - DEV_NVLINK_BANDWIDTH_C1_L9 = 129 # NVLink Bandwidth Counter for Counter Set 1, Lane 9 - DEV_NVLINK_BANDWIDTH_C1_L10 = 130 # NVLink Bandwidth Counter for Counter Set 1, Lane 10 - DEV_NVLINK_BANDWIDTH_C1_L11 = 131 # NVLink Bandwidth Counter for Counter Set 1, Lane 11 + DEV_NVLINK_BANDWIDTH_C1_L6 = (126, "NVLink Bandwidth Counter for Counter Set 1, Lane 6") + DEV_NVLINK_BANDWIDTH_C1_L7 = (127, "NVLink Bandwidth Counter for Counter Set 1, Lane 7") + DEV_NVLINK_BANDWIDTH_C1_L8 = (128, "NVLink Bandwidth Counter for Counter Set 1, Lane 8") + DEV_NVLINK_BANDWIDTH_C1_L9 = (129, "NVLink Bandwidth Counter for Counter Set 1, Lane 9") + DEV_NVLINK_BANDWIDTH_C1_L10 = (130, "NVLink Bandwidth Counter for Counter Set 1, Lane 10") + DEV_NVLINK_BANDWIDTH_C1_L11 = (131, "NVLink Bandwidth Counter for Counter Set 1, Lane 11") # NVLink Speed - DEV_NVLINK_SPEED_MBPS_L6 = 132 # NVLink Speed in MBps for Link 6 - DEV_NVLINK_SPEED_MBPS_L7 = 133 # NVLink Speed in MBps for Link 7 - DEV_NVLINK_SPEED_MBPS_L8 = 134 # NVLink Speed in MBps for Link 8 - DEV_NVLINK_SPEED_MBPS_L9 = 135 # NVLink Speed in MBps for Link 9 - DEV_NVLINK_SPEED_MBPS_L10 = 136 # NVLink Speed in MBps for Link 10 - DEV_NVLINK_SPEED_MBPS_L11 = 137 # NVLink Speed in MBps for Link 11 + DEV_NVLINK_SPEED_MBPS_L6 = (132, "NVLink Speed in MBps for Link 6") + DEV_NVLINK_SPEED_MBPS_L7 = (133, "NVLink Speed in MBps for Link 7") + DEV_NVLINK_SPEED_MBPS_L8 = (134, "NVLink Speed in MBps for Link 8") + DEV_NVLINK_SPEED_MBPS_L9 = (135, "NVLink Speed in MBps for Link 9") + DEV_NVLINK_SPEED_MBPS_L10 = (136, "NVLink Speed in MBps for Link 10") + DEV_NVLINK_SPEED_MBPS_L11 = (137, "NVLink Speed in MBps for Link 11") # NVLink throughput counters field values - DEV_NVLINK_THROUGHPUT_DATA_TX = 138 # NVLink TX Data throughput in KiB - DEV_NVLINK_THROUGHPUT_DATA_RX = 139 # NVLink RX Data throughput in KiB - DEV_NVLINK_THROUGHPUT_RAW_TX = 140 # NVLink TX Data + protocol overhead in KiB - DEV_NVLINK_THROUGHPUT_RAW_RX = 141 # NVLink RX Data + protocol overhead in KiB + DEV_NVLINK_THROUGHPUT_DATA_TX = (138, "NVLink TX Data throughput in KiB") + DEV_NVLINK_THROUGHPUT_DATA_RX = (139, "NVLink RX Data throughput in KiB") + DEV_NVLINK_THROUGHPUT_RAW_TX = (140, "NVLink TX Data + protocol overhead in KiB") + DEV_NVLINK_THROUGHPUT_RAW_RX = (141, "NVLink RX Data + protocol overhead in KiB") # Row Remapper - DEV_REMAPPED_COR = 142 # Number of remapped rows due to correctable errors - DEV_REMAPPED_UNC = 143 # Number of remapped rows due to uncorrectable errors - DEV_REMAPPED_PENDING = 144 # If any rows are pending remapping. 1=yes 0=no - DEV_REMAPPED_FAILURE = 145 # If any rows failed to be remapped 1=yes 0=no + DEV_REMAPPED_COR = (142, "Number of remapped rows due to correctable errors") + DEV_REMAPPED_UNC = (143, "Number of remapped rows due to uncorrectable errors") + DEV_REMAPPED_PENDING = (144, "If any rows are pending remapping. 1=yes 0=no") + DEV_REMAPPED_FAILURE = (145, "If any rows failed to be remapped 1=yes 0=no") # Remote device NVLink ID - DEV_NVLINK_REMOTE_NVLINK_ID = 146 # Remote device NVLink ID + DEV_NVLINK_REMOTE_NVLINK_ID = (146, "Remote device NVLink ID") # NVSwitch: connected NVLink count - DEV_NVSWITCH_CONNECTED_LINK_COUNT = 147 # Number of NVLinks connected to NVSwitch + DEV_NVSWITCH_CONNECTED_LINK_COUNT = (147, "Number of NVLinks connected to NVSwitch") # NvLink ECC Data Error Counters - DEV_NVLINK_ECC_DATA_ERROR_COUNT_L0 = 148 # NVLink data ECC Error Counter for Link 0 - DEV_NVLINK_ECC_DATA_ERROR_COUNT_L1 = 149 # NVLink data ECC Error Counter for Link 1 - DEV_NVLINK_ECC_DATA_ERROR_COUNT_L2 = 150 # NVLink data ECC Error Counter for Link 2 - DEV_NVLINK_ECC_DATA_ERROR_COUNT_L3 = 151 # NVLink data ECC Error Counter for Link 3 - DEV_NVLINK_ECC_DATA_ERROR_COUNT_L4 = 152 # NVLink data ECC Error Counter for Link 4 - DEV_NVLINK_ECC_DATA_ERROR_COUNT_L5 = 153 # NVLink data ECC Error Counter for Link 5 - DEV_NVLINK_ECC_DATA_ERROR_COUNT_L6 = 154 # NVLink data ECC Error Counter for Link 6 - DEV_NVLINK_ECC_DATA_ERROR_COUNT_L7 = 155 # NVLink data ECC Error Counter for Link 7 - DEV_NVLINK_ECC_DATA_ERROR_COUNT_L8 = 156 # NVLink data ECC Error Counter for Link 8 - DEV_NVLINK_ECC_DATA_ERROR_COUNT_L9 = 157 # NVLink data ECC Error Counter for Link 9 - DEV_NVLINK_ECC_DATA_ERROR_COUNT_L10 = 158 # NVLink data ECC Error Counter for Link 10 - DEV_NVLINK_ECC_DATA_ERROR_COUNT_L11 = 159 # NVLink data ECC Error Counter for Link 11 - DEV_NVLINK_ECC_DATA_ERROR_COUNT_TOTAL =160 # NVLink data ECC Error Counter total for all Links + DEV_NVLINK_ECC_DATA_ERROR_COUNT_L0 = (148, "NVLink data ECC Error Counter for Link 0") + DEV_NVLINK_ECC_DATA_ERROR_COUNT_L1 = (149, "NVLink data ECC Error Counter for Link 1") + DEV_NVLINK_ECC_DATA_ERROR_COUNT_L2 = (150, "NVLink data ECC Error Counter for Link 2") + DEV_NVLINK_ECC_DATA_ERROR_COUNT_L3 = (151, "NVLink data ECC Error Counter for Link 3") + DEV_NVLINK_ECC_DATA_ERROR_COUNT_L4 = (152, "NVLink data ECC Error Counter for Link 4") + DEV_NVLINK_ECC_DATA_ERROR_COUNT_L5 = (153, "NVLink data ECC Error Counter for Link 5") + DEV_NVLINK_ECC_DATA_ERROR_COUNT_L6 = (154, "NVLink data ECC Error Counter for Link 6") + DEV_NVLINK_ECC_DATA_ERROR_COUNT_L7 = (155, "NVLink data ECC Error Counter for Link 7") + DEV_NVLINK_ECC_DATA_ERROR_COUNT_L8 = (156, "NVLink data ECC Error Counter for Link 8") + DEV_NVLINK_ECC_DATA_ERROR_COUNT_L9 = (157, "NVLink data ECC Error Counter for Link 9") + DEV_NVLINK_ECC_DATA_ERROR_COUNT_L10 = (158, "NVLink data ECC Error Counter for Link 10") + DEV_NVLINK_ECC_DATA_ERROR_COUNT_L11 = (159, "NVLink data ECC Error Counter for Link 11") + DEV_NVLINK_ECC_DATA_ERROR_COUNT_TOTAL = (160, "NVLink data ECC Error Counter total for all Links") # NVLink Error Replay - DEV_NVLINK_ERROR_DL_REPLAY = 161 # NVLink Replay Error Counter + DEV_NVLINK_ERROR_DL_REPLAY = (161, "NVLink Replay Error Counter") # NVLink Recovery Error Counter - DEV_NVLINK_ERROR_DL_RECOVERY = 162 # NVLink Recovery Error Counter + DEV_NVLINK_ERROR_DL_RECOVERY = (162, "NVLink Recovery Error Counter") # NVLink Recovery Error CRC Counter - DEV_NVLINK_ERROR_DL_CRC = 163 # NVLink CRC Error Counter + DEV_NVLINK_ERROR_DL_CRC = (163, "NVLink CRC Error Counter") # NVLink Speed, State and Version field id 164, 165, and 166 - DEV_NVLINK_GET_SPEED = 164 # NVLink Speed in MBps - DEV_NVLINK_GET_STATE = 165 # NVLink State - Active,Inactive - DEV_NVLINK_GET_VERSION = 166 # NVLink Version - - DEV_NVLINK_GET_POWER_STATE = 167 # NVLink Power state. 0=HIGH_SPEED 1=LOW_SPEED - DEV_NVLINK_GET_POWER_THRESHOLD = 168 # NVLink length of idle period (units can be found from - # DEV_NVLINK_GET_POWER_THRESHOLD_UNITS) before - # transitioning links to sleep state - - DEV_PCIE_L0_TO_RECOVERY_COUNTER = 169 # Device PEX error recovery counter - - DEV_C2C_LINK_COUNT = 170 # Number of C2C Links present on the device - DEV_C2C_LINK_GET_STATUS = 171 # C2C Link Status 0=INACTIVE 1=ACTIVE - DEV_C2C_LINK_GET_MAX_BW = 172 # C2C Link Speed in MBps for active links - - DEV_PCIE_COUNT_CORRECTABLE_ERRORS = 173 # PCIe Correctable Errors Counter - DEV_PCIE_COUNT_NAKS_RECEIVED = 174 # PCIe NAK Receive Counter - DEV_PCIE_COUNT_RECEIVER_ERROR = 175 # PCIe Receiver Error Counter - DEV_PCIE_COUNT_BAD_TLP = 176 # PCIe Bad TLP Counter - DEV_PCIE_COUNT_NAKS_SENT = 177 # PCIe NAK Send Counter - DEV_PCIE_COUNT_BAD_DLLP = 178 # PCIe Bad DLLP Counter - DEV_PCIE_COUNT_NON_FATAL_ERROR = 179 # PCIe Non Fatal Error Counter - DEV_PCIE_COUNT_FATAL_ERROR = 180 # PCIe Fatal Error Counter - DEV_PCIE_COUNT_UNSUPPORTED_REQ = 181 # PCIe Unsupported Request Counter - DEV_PCIE_COUNT_LCRC_ERROR = 182 # PCIe LCRC Error Counter - DEV_PCIE_COUNT_LANE_ERROR = 183 # PCIe Per Lane Error Counter. - - DEV_IS_RESETLESS_MIG_SUPPORTED = 184 # Device's Restless MIG Capability - - DEV_POWER_AVERAGE = 185 # GPU power averaged over 1 sec interval, supported on Ampere (except GA100) or newer architectures. - DEV_POWER_INSTANT = 186 # Current GPU power, supported on all architectures. - DEV_POWER_MIN_LIMIT = 187 # Minimum power limit in milliwatts. - DEV_POWER_MAX_LIMIT = 188 # Maximum power limit in milliwatts. - DEV_POWER_DEFAULT_LIMIT = 189 # Default power limit in milliwatts (limit which device boots with). - DEV_POWER_CURRENT_LIMIT = 190 # Limit currently enforced in milliwatts (This includes other limits set elsewhere. E.g. Out-of-band). - DEV_ENERGY = 191 # Total energy consumption (in mJ) since the driver was last reloaded. Same as \ref DEV_TOTAL_ENERGY_CONSUMPTION for the GPU. - DEV_POWER_REQUESTED_LIMIT = 192 # Power limit requested by NVML or any other userspace client. + DEV_NVLINK_GET_SPEED = (164, "NVLink Speed in MBps") + DEV_NVLINK_GET_STATE = (165, "NVLink State - Active,Inactive") + DEV_NVLINK_GET_VERSION = (166, "NVLink Version") + + DEV_NVLINK_GET_POWER_STATE = (167, "NVLink Power state. 0=HIGH_SPEED 1=LOW_SPEED") + DEV_NVLINK_GET_POWER_THRESHOLD = (168, "NVLink length of idle period (units can be found from DEV_NVLINK_GET_POWER_THRESHOLD_UNITS) before transitioning links to sleep state") + + DEV_PCIE_L0_TO_RECOVERY_COUNTER = (169, "Device PEX error recovery counter") + + DEV_C2C_LINK_COUNT = (170, "Number of C2C Links present on the device") + DEV_C2C_LINK_GET_STATUS = (171, "C2C Link Status 0=INACTIVE 1=ACTIVE") + DEV_C2C_LINK_GET_MAX_BW = (172, "C2C Link Speed in MBps for active links") + + DEV_PCIE_COUNT_CORRECTABLE_ERRORS = (173, "PCIe Correctable Errors Counter") + DEV_PCIE_COUNT_NAKS_RECEIVED = (174, "PCIe NAK Receive Counter") + DEV_PCIE_COUNT_RECEIVER_ERROR = (175, "PCIe Receiver Error Counter") + DEV_PCIE_COUNT_BAD_TLP = (176, "PCIe Bad TLP Counter") + DEV_PCIE_COUNT_NAKS_SENT = (177, "PCIe NAK Send Counter") + DEV_PCIE_COUNT_BAD_DLLP = (178, "PCIe Bad DLLP Counter") + DEV_PCIE_COUNT_NON_FATAL_ERROR = (179, "PCIe Non Fatal Error Counter") + DEV_PCIE_COUNT_FATAL_ERROR = (180, "PCIe Fatal Error Counter") + DEV_PCIE_COUNT_UNSUPPORTED_REQ = (181, "PCIe Unsupported Request Counter") + DEV_PCIE_COUNT_LCRC_ERROR = (182, "PCIe LCRC Error Counter") + DEV_PCIE_COUNT_LANE_ERROR = (183, "PCIe Per Lane Error Counter.") + + DEV_IS_RESETLESS_MIG_SUPPORTED = (184, "Device's Restless MIG Capability") + + DEV_POWER_AVERAGE = (185, "GPU power averaged over 1 sec interval, supported on Ampere (except GA100) or newer architectures.") + DEV_POWER_INSTANT = (186, "Current GPU power, supported on all architectures.") + DEV_POWER_MIN_LIMIT = (187, "Minimum power limit in milliwatts.") + DEV_POWER_MAX_LIMIT = (188, "Maximum power limit in milliwatts.") + DEV_POWER_DEFAULT_LIMIT = (189, "Default power limit in milliwatts (limit which device boots with).") + DEV_POWER_CURRENT_LIMIT = (190, "Limit currently enforced in milliwatts (This includes other limits set elsewhere. E.g. Out-of-band).") + DEV_ENERGY = (191, "Total energy consumption (in mJ) since the driver was last reloaded. Same as \ref DEV_TOTAL_ENERGY_CONSUMPTION for the GPU.") + DEV_POWER_REQUESTED_LIMIT = (192, "Power limit requested by NVML or any other userspace client.") # GPU T.Limit temperature thresholds in degree Celsius - DEV_TEMPERATURE_SHUTDOWN_TLIMIT = 193 # T.Limit temperature after which GPU may shut down for HW protection - DEV_TEMPERATURE_SLOWDOWN_TLIMIT = 194 # T.Limit temperature after which GPU may begin HW slowdown - DEV_TEMPERATURE_MEM_MAX_TLIMIT = 195 # T.Limit temperature after which GPU may begin SW slowdown due to memory temperature - DEV_TEMPERATURE_GPU_MAX_TLIMIT = 196 # T.Limit temperature after which GPU may be throttled below base clock + DEV_TEMPERATURE_SHUTDOWN_TLIMIT = (193, "T.Limit temperature after which GPU may shut down for HW protection") + DEV_TEMPERATURE_SLOWDOWN_TLIMIT = (194, "T.Limit temperature after which GPU may begin HW slowdown") + DEV_TEMPERATURE_MEM_MAX_TLIMIT = (195, "T.Limit temperature after which GPU may begin SW slowdown due to memory temperature") + DEV_TEMPERATURE_GPU_MAX_TLIMIT = (196, "T.Limit temperature after which GPU may be throttled below base clock") - DEV_PCIE_COUNT_TX_BYTES = 197 # PCIe transmit bytes. Value can be wrapped. - DEV_PCIE_COUNT_RX_BYTES = 198 # PCIe receive bytes. Value can be wrapped. + DEV_PCIE_COUNT_TX_BYTES = (197, "PCIe transmit bytes. Value can be wrapped.") + DEV_PCIE_COUNT_RX_BYTES = (198, "PCIe receive bytes. Value can be wrapped.") - DEV_IS_MIG_MODE_INDEPENDENT_MIG_QUERY_CAPABLE = 199 # MIG mode independent, MIG query capable device. 1=yes. 0=no. + DEV_IS_MIG_MODE_INDEPENDENT_MIG_QUERY_CAPABLE = (199, "MIG mode independent, MIG query capable device. 1=yes. 0=no.") - DEV_NVLINK_GET_POWER_THRESHOLD_MAX = 200 # Max Nvlink Power Threshold. See DEV_NVLINK_GET_POWER_THRESHOLD + DEV_NVLINK_GET_POWER_THRESHOLD_MAX = (200, "Max Nvlink Power Threshold. See DEV_NVLINK_GET_POWER_THRESHOLD") # NVLink counter field id 201-225 - DEV_NVLINK_COUNT_XMIT_PACKETS = 201 # Total Tx packets on the link in NVLink5 - DEV_NVLINK_COUNT_XMIT_BYTES = 202 # Total Tx bytes on the link in NVLink5 - DEV_NVLINK_COUNT_RCV_PACKETS = 203 # Total Rx packets on the link in NVLink5 - DEV_NVLINK_COUNT_RCV_BYTES = 204 # Total Rx bytes on the link in NVLink5 - DEV_NVLINK_COUNT_VL15_DROPPED = 205 # Deprecated, do not use - DEV_NVLINK_COUNT_MALFORMED_PACKET_ERRORS = 206 # Number of packets Rx on a link where packets are malformed - DEV_NVLINK_COUNT_BUFFER_OVERRUN_ERRORS = 207 # Number of packets that were discarded on Rx due to buffer overrun - DEV_NVLINK_COUNT_RCV_ERRORS = 208 # Total number of packets with errors Rx on a link - DEV_NVLINK_COUNT_RCV_REMOTE_ERRORS = 209 # Total number of packets Rx - stomp/EBP marker - DEV_NVLINK_COUNT_RCV_GENERAL_ERRORS = 210 # Total number of packets Rx with header mismatch - DEV_NVLINK_COUNT_LOCAL_LINK_INTEGRITY_ERRORS = 211 # Total number of times that the count of local errors exceeded a threshold - DEV_NVLINK_COUNT_XMIT_DISCARDS = 212 # Total number of tx error packets that were discarded - - DEV_NVLINK_COUNT_LINK_RECOVERY_SUCCESSFUL_EVENTS =213 # Number of times link went from Up to recovery, succeeded and link came back up - DEV_NVLINK_COUNT_LINK_RECOVERY_FAILED_EVENTS = 214 # Number of times link went from Up to recovery, failed and link was declared down - DEV_NVLINK_COUNT_LINK_RECOVERY_EVENTS = 215 # Number of times link went from Up to recovery, irrespective of the result - - DEV_NVLINK_COUNT_RAW_BER_LANE0 = 216 # Deprecated, do not use - DEV_NVLINK_COUNT_RAW_BER_LANE1 = 217 # Deprecated, do not use - DEV_NVLINK_COUNT_RAW_BER = 218 # Deprecated, do not use - DEV_NVLINK_COUNT_EFFECTIVE_ERRORS = 219 # Sum of the number of errors in each Nvlink packet + DEV_NVLINK_COUNT_XMIT_PACKETS = (201, "Total Tx packets on the link in NVLink5") + DEV_NVLINK_COUNT_XMIT_BYTES = (202, "Total Tx bytes on the link in NVLink5") + DEV_NVLINK_COUNT_RCV_PACKETS = (203, "Total Rx packets on the link in NVLink5") + DEV_NVLINK_COUNT_RCV_BYTES = (204, "Total Rx bytes on the link in NVLink5") + DEV_NVLINK_COUNT_VL15_DROPPED = (205, "Deprecated, do not use") + DEV_NVLINK_COUNT_MALFORMED_PACKET_ERRORS = (206, "Number of packets Rx on a link where packets are malformed") + DEV_NVLINK_COUNT_BUFFER_OVERRUN_ERRORS = (207, "Number of packets that were discarded on Rx due to buffer overrun") + DEV_NVLINK_COUNT_RCV_ERRORS = (208, "Total number of packets with errors Rx on a link") + DEV_NVLINK_COUNT_RCV_REMOTE_ERRORS = (209, "Total number of packets Rx - stomp/EBP marker") + DEV_NVLINK_COUNT_RCV_GENERAL_ERRORS = (210, "Total number of packets Rx with header mismatch") + DEV_NVLINK_COUNT_LOCAL_LINK_INTEGRITY_ERRORS = (211, "Total number of times that the count of local errors exceeded a threshold") + DEV_NVLINK_COUNT_XMIT_DISCARDS = (212, "Total number of tx error packets that were discarded") + + DEV_NVLINK_COUNT_LINK_RECOVERY_SUCCESSFUL_EVENTS =(213, "Number of times link went from Up to recovery, succeeded and link came back up") + DEV_NVLINK_COUNT_LINK_RECOVERY_FAILED_EVENTS = (214, "Number of times link went from Up to recovery, failed and link was declared down") + DEV_NVLINK_COUNT_LINK_RECOVERY_EVENTS = (215, "Number of times link went from Up to recovery, irrespective of the result") + + DEV_NVLINK_COUNT_RAW_BER_LANE0 = (216, "Deprecated, do not use") + DEV_NVLINK_COUNT_RAW_BER_LANE1 = (217, "Deprecated, do not use") + DEV_NVLINK_COUNT_RAW_BER = (218, "Deprecated, do not use") + DEV_NVLINK_COUNT_EFFECTIVE_ERRORS = (219, "Sum of the number of errors in each Nvlink packet") # NVLink Effective BER - DEV_NVLINK_COUNT_EFFECTIVE_BER = 220 # Effective BER for effective errors - DEV_NVLINK_COUNT_SYMBOL_ERRORS = 221 # Number of errors in rx symbols + DEV_NVLINK_COUNT_EFFECTIVE_BER = (220, "Effective BER for effective errors") + DEV_NVLINK_COUNT_SYMBOL_ERRORS = (221, "Number of errors in rx symbols") # NVLink Symbol BER - DEV_NVLINK_COUNT_SYMBOL_BER = 222 # BER for symbol errors - - DEV_NVLINK_GET_POWER_THRESHOLD_MIN = 223 # Min Nvlink Power Threshold. See DEV_NVLINK_GET_POWER_THRESHOLD - DEV_NVLINK_GET_POWER_THRESHOLD_UNITS = 224 # Values are in the form NVML_NVLINK_LOW_POWER_THRESHOLD_UNIT_* - DEV_NVLINK_GET_POWER_THRESHOLD_SUPPORTED = 225 # Determine if Nvlink Power Threshold feature is supported - - DEV_RESET_STATUS = 226 # Depracated, do not use (use DEV_GET_GPU_RECOVERY_ACTION instead) - DEV_DRAIN_AND_RESET_STATUS = 227 # Deprecated, do not use (use DEV_GET_GPU_RECOVERY_ACTION instead) - DEV_PCIE_OUTBOUND_ATOMICS_MASK = 228 - DEV_PCIE_INBOUND_ATOMICS_MASK = 229 - DEV_GET_GPU_RECOVERY_ACTION = 230 # GPU Recovery action - None/Reset/Reboot/Drain P2P/Drain and Reset - DEV_C2C_LINK_ERROR_INTR = 231 # C2C Link CRC Error Counter - DEV_C2C_LINK_ERROR_REPLAY = 232 # C2C Link Replay Error Counter - DEV_C2C_LINK_ERROR_REPLAY_B2B = 233 # C2C Link Back to Back Replay Error Counter - DEV_C2C_LINK_POWER_STATE = 234 # C2C Link Power state. See NVML_C2C_POWER_STATE_* + DEV_NVLINK_COUNT_SYMBOL_BER = (222, "BER for symbol errors") + + DEV_NVLINK_GET_POWER_THRESHOLD_MIN = (223, "Min Nvlink Power Threshold. See DEV_NVLINK_GET_POWER_THRESHOLD") + DEV_NVLINK_GET_POWER_THRESHOLD_UNITS = (224, "Values are in the form NVML_NVLINK_LOW_POWER_THRESHOLD_UNIT_*") + DEV_NVLINK_GET_POWER_THRESHOLD_SUPPORTED = (225, "Determine if Nvlink Power Threshold feature is supported") + + DEV_RESET_STATUS = (226, "Depracated, do not use (use DEV_GET_GPU_RECOVERY_ACTION instead)") + DEV_DRAIN_AND_RESET_STATUS = (227, "Deprecated, do not use (use DEV_GET_GPU_RECOVERY_ACTION instead)") + DEV_PCIE_OUTBOUND_ATOMICS_MASK = 228 + DEV_PCIE_INBOUND_ATOMICS_MASK = 229 + DEV_GET_GPU_RECOVERY_ACTION = (230, "GPU Recovery action - None/Reset/Reboot/Drain P2P/Drain and Reset") + DEV_C2C_LINK_ERROR_INTR = (231, "C2C Link CRC Error Counter") + DEV_C2C_LINK_ERROR_REPLAY = (232, "C2C Link Replay Error Counter") + DEV_C2C_LINK_ERROR_REPLAY_B2B = (233, "C2C Link Back to Back Replay Error Counter") + DEV_C2C_LINK_POWER_STATE = (234, "C2C Link Power state. See NVML_C2C_POWER_STATE_*") # NVLink counter field id 235-250 - DEV_NVLINK_COUNT_FEC_HISTORY_0 = 235 # Count of symbol errors that are corrected - bin 0 - DEV_NVLINK_COUNT_FEC_HISTORY_1 = 236 # Count of symbol errors that are corrected - bin 1 - DEV_NVLINK_COUNT_FEC_HISTORY_2 = 237 # Count of symbol errors that are corrected - bin 2 - DEV_NVLINK_COUNT_FEC_HISTORY_3 = 238 # Count of symbol errors that are corrected - bin 3 - DEV_NVLINK_COUNT_FEC_HISTORY_4 = 239 # Count of symbol errors that are corrected - bin 4 - DEV_NVLINK_COUNT_FEC_HISTORY_5 = 240 # Count of symbol errors that are corrected - bin 5 - DEV_NVLINK_COUNT_FEC_HISTORY_6 = 241 # Count of symbol errors that are corrected - bin 6 - DEV_NVLINK_COUNT_FEC_HISTORY_7 = 242 # Count of symbol errors that are corrected - bin 7 - DEV_NVLINK_COUNT_FEC_HISTORY_8 = 243 # Count of symbol errors that are corrected - bin 8 - DEV_NVLINK_COUNT_FEC_HISTORY_9 = 244 # Count of symbol errors that are corrected - bin 9 - DEV_NVLINK_COUNT_FEC_HISTORY_10 = 245 # Count of symbol errors that are corrected - bin 10 - DEV_NVLINK_COUNT_FEC_HISTORY_11 = 246 # Count of symbol errors that are corrected - bin 11 - DEV_NVLINK_COUNT_FEC_HISTORY_12 = 247 # Count of symbol errors that are corrected - bin 12 - DEV_NVLINK_COUNT_FEC_HISTORY_13 = 248 # Count of symbol errors that are corrected - bin 13 - DEV_NVLINK_COUNT_FEC_HISTORY_14 = 249 # Count of symbol errors that are corrected - bin 14 - DEV_NVLINK_COUNT_FEC_HISTORY_15 = 250 # Count of symbol errors that are corrected - bin 15 + DEV_NVLINK_COUNT_FEC_HISTORY_0 = (235, "Count of symbol errors that are corrected - bin 0") + DEV_NVLINK_COUNT_FEC_HISTORY_1 = (236, "Count of symbol errors that are corrected - bin 1") + DEV_NVLINK_COUNT_FEC_HISTORY_2 = (237, "Count of symbol errors that are corrected - bin 2") + DEV_NVLINK_COUNT_FEC_HISTORY_3 = (238, "Count of symbol errors that are corrected - bin 3") + DEV_NVLINK_COUNT_FEC_HISTORY_4 = (239, "Count of symbol errors that are corrected - bin 4") + DEV_NVLINK_COUNT_FEC_HISTORY_5 = (240, "Count of symbol errors that are corrected - bin 5") + DEV_NVLINK_COUNT_FEC_HISTORY_6 = (241, "Count of symbol errors that are corrected - bin 6") + DEV_NVLINK_COUNT_FEC_HISTORY_7 = (242, "Count of symbol errors that are corrected - bin 7") + DEV_NVLINK_COUNT_FEC_HISTORY_8 = (243, "Count of symbol errors that are corrected - bin 8") + DEV_NVLINK_COUNT_FEC_HISTORY_9 = (244, "Count of symbol errors that are corrected - bin 9") + DEV_NVLINK_COUNT_FEC_HISTORY_10 = (245, "Count of symbol errors that are corrected - bin 10") + DEV_NVLINK_COUNT_FEC_HISTORY_11 = (246, "Count of symbol errors that are corrected - bin 11") + DEV_NVLINK_COUNT_FEC_HISTORY_12 = (247, "Count of symbol errors that are corrected - bin 12") + DEV_NVLINK_COUNT_FEC_HISTORY_13 = (248, "Count of symbol errors that are corrected - bin 13") + DEV_NVLINK_COUNT_FEC_HISTORY_14 = (249, "Count of symbol errors that are corrected - bin 14") + DEV_NVLINK_COUNT_FEC_HISTORY_15 = (250, "Count of symbol errors that are corrected - bin 15") # Power Smoothing - PWR_SMOOTHING_ENABLED = 251 # Enablement (0/DISABLED or 1/ENABLED) - PWR_SMOOTHING_PRIV_LVL = 252 # Current privilege level - PWR_SMOOTHING_IMM_RAMP_DOWN_ENABLED = 253 # Immediate ramp down enablement (0/DISABLED or 1/ENABLED) - PWR_SMOOTHING_APPLIED_TMP_CEIL = 254 # Applied TMP ceiling value in Watts - PWR_SMOOTHING_APPLIED_TMP_FLOOR = 255 # Applied TMP floor value in Watts - PWR_SMOOTHING_MAX_PERCENT_TMP_FLOOR_SETTING = 256 # Max % TMP Floor value - PWR_SMOOTHING_MIN_PERCENT_TMP_FLOOR_SETTING = 257 # Min % TMP Floor value - PWR_SMOOTHING_HW_CIRCUITRY_PERCENT_LIFETIME_REMAINING = 258 # HW Circuitry % lifetime remaining - PWR_SMOOTHING_MAX_NUM_PRESET_PROFILES = 259 # Max number of preset profiles - PWR_SMOOTHING_PROFILE_PERCENT_TMP_FLOOR = 260 # % TMP floor for a given profile - PWR_SMOOTHING_PROFILE_RAMP_UP_RATE = 261 # Ramp up rate in mW/s for a given profile - PWR_SMOOTHING_PROFILE_RAMP_DOWN_RATE = 262 # Ramp down rate in mW/s for a given profile - PWR_SMOOTHING_PROFILE_RAMP_DOWN_HYST_VAL = 263 # Ramp down hysteresis value in ms for a given profile - PWR_SMOOTHING_ACTIVE_PRESET_PROFILE = 264 # Active preset profile number - PWR_SMOOTHING_ADMIN_OVERRIDE_PERCENT_TMP_FLOOR = 265 # % TMP floor for a given profile - PWR_SMOOTHING_ADMIN_OVERRIDE_RAMP_UP_RATE = 266 # Ramp up rate in mW/s for a given profile - PWR_SMOOTHING_ADMIN_OVERRIDE_RAMP_DOWN_RATE = 267 # Ramp down rate in mW/s for a given profile - PWR_SMOOTHING_ADMIN_OVERRIDE_RAMP_DOWN_HYST_VAL = 268 # Ramp down hysteresis value in ms for a given profile + PWR_SMOOTHING_ENABLED = (251, "Enablement (0/DISABLED or 1/ENABLED)") + PWR_SMOOTHING_PRIV_LVL = (252, "Current privilege level") + PWR_SMOOTHING_IMM_RAMP_DOWN_ENABLED = (253, "Immediate ramp down enablement (0/DISABLED or 1/ENABLED)") + PWR_SMOOTHING_APPLIED_TMP_CEIL = (254, "Applied TMP ceiling value in Watts") + PWR_SMOOTHING_APPLIED_TMP_FLOOR = (255, "Applied TMP floor value in Watts") + PWR_SMOOTHING_MAX_PERCENT_TMP_FLOOR_SETTING = (256, "Max % TMP Floor value") + PWR_SMOOTHING_MIN_PERCENT_TMP_FLOOR_SETTING = (257, "Min % TMP Floor value") + PWR_SMOOTHING_HW_CIRCUITRY_PERCENT_LIFETIME_REMAINING = (258, "HW Circuitry % lifetime remaining") + PWR_SMOOTHING_MAX_NUM_PRESET_PROFILES = (259, "Max number of preset profiles") + PWR_SMOOTHING_PROFILE_PERCENT_TMP_FLOOR = (260, "% TMP floor for a given profile") + PWR_SMOOTHING_PROFILE_RAMP_UP_RATE = (261, "Ramp up rate in mW/s for a given profile") + PWR_SMOOTHING_PROFILE_RAMP_DOWN_RATE = (262, "Ramp down rate in mW/s for a given profile") + PWR_SMOOTHING_PROFILE_RAMP_DOWN_HYST_VAL = (263, "Ramp down hysteresis value in ms for a given profile") + PWR_SMOOTHING_ACTIVE_PRESET_PROFILE = (264, "Active preset profile number") + PWR_SMOOTHING_ADMIN_OVERRIDE_PERCENT_TMP_FLOOR = (265, "% TMP floor for a given profile") + PWR_SMOOTHING_ADMIN_OVERRIDE_RAMP_UP_RATE = (266, "Ramp up rate in mW/s for a given profile") + PWR_SMOOTHING_ADMIN_OVERRIDE_RAMP_DOWN_RATE = (267, "Ramp down rate in mW/s for a given profile") + PWR_SMOOTHING_ADMIN_OVERRIDE_RAMP_DOWN_HYST_VAL = (268, "Ramp down hysteresis value in ms for a given profile") # Field values for Clock Throttle Reason Counters - DEV_CLOCKS_EVENT_REASON_SW_POWER_CAP = DEV_PERF_POLICY_POWER # Throttling to not exceed currently set power limits in ns - DEV_CLOCKS_EVENT_REASON_SYNC_BOOST = DEV_PERF_POLICY_SYNC_BOOST # Throttling to match minimum possible clock across Sync Boost Group in ns - DEV_CLOCKS_EVENT_REASON_SW_THERM_SLOWDOWN = 269 # Throttling to ensure ((GPU temp < GPU Max Operating Temp) && (Memory Temp < Memory Max Operating Temp)) in ns - DEV_CLOCKS_EVENT_REASON_HW_THERM_SLOWDOWN = 270 # Throttling due to temperature being too high (reducing core clocks by a factor of 2 or more) in ns - DEV_CLOCKS_EVENT_REASON_HW_POWER_BRAKE_SLOWDOWN = 271 # Throttling due to external power brake assertion trigger (reducing core clocks by a factor of 2 or more) in ns - DEV_POWER_SYNC_BALANCING_FREQ = 272 # Accumulated frequency of the GPU to be used for averaging - DEV_POWER_SYNC_BALANCING_AF = 273 # Accumulated activity factor of the GPU to be used for averaging - DEV_EDPP_MULTIPLIER = 274 # EDPp multiplier expressed as a percentage - - PWR_SMOOTHING_PRIMARY_POWER_FLOOR = 275 # Current primary power floor value in Watts - PWR_SMOOTHING_SECONDARY_POWER_FLOOR = 276 # Current secondary power floor value in Watts - PWR_SMOOTHING_MIN_PRIMARY_FLOOR_ACT_OFFSET = 277 # Minimum primary floor activation offset value in Watts - PWR_SMOOTHING_MIN_PRIMARY_FLOOR_ACT_POINT = 278 # Minimum primary floor activation point value in Watts - PWR_SMOOTHING_WINDOW_MULTIPLIER = 279 # Window Multiplier value in ms - PWR_SMOOTHING_DELAYED_PWR_SMOOTHING_SUPPORTED = 280 # Support (0/Not Supported or 1/Supported) for delayed power smoothing - PWR_SMOOTHING_PROFILE_SECONDARY_POWER_FLOOR = 281 # Current secondary power floor value in Watts for a given profile - PWR_SMOOTHING_PROFILE_PRIMARY_FLOOR_ACT_WIN_MULT = 282 # Current primary floor activation window multiplier value for a given profile - PWR_SMOOTHING_PROFILE_PRIMARY_FLOOR_TAR_WIN_MULT = 283 # Current primary floor target window multiplier value for a given profile - PWR_SMOOTHING_PROFILE_PRIMARY_FLOOR_ACT_OFFSET = 284 # Current primary floor activation offset value in Watts for a given profile - PWR_SMOOTHING_ADMIN_OVERRIDE_SECONDARY_POWER_FLOOR = 285 # Current secondary power floor value in Watts for admin override - PWR_SMOOTHING_ADMIN_OVERRIDE_PRIMARY_FLOOR_ACT_WIN_MULT = 286 # Current primary floor activation window multiplier value for admin override - PWR_SMOOTHING_ADMIN_OVERRIDE_PRIMARY_FLOOR_TAR_WIN_MULT = 287 # Current primary floor target window multiplier value for admin override - PWR_SMOOTHING_ADMIN_OVERRIDE_PRIMARY_FLOOR_ACT_OFFSET = 288 # Current primary floor activation offset value in Watts for admin override + DEV_CLOCKS_EVENT_REASON_SW_POWER_CAP = (74, "Throttling to not exceed currently set power limits in ns") + DEV_CLOCKS_EVENT_REASON_SYNC_BOOST = (76, "Throttling to match minimum possible clock across Sync Boost Group in ns") + DEV_CLOCKS_EVENT_REASON_SW_THERM_SLOWDOWN = (269, "Throttling to ensure ((GPU temp < GPU Max Operating Temp) && (Memory Temp < Memory Max Operating Temp)) in ns") + DEV_CLOCKS_EVENT_REASON_HW_THERM_SLOWDOWN = (270, "Throttling due to temperature being too high (reducing core clocks by a factor of 2 or more) in ns") + DEV_CLOCKS_EVENT_REASON_HW_POWER_BRAKE_SLOWDOWN = (271, "Throttling due to external power brake assertion trigger (reducing core clocks by a factor of 2 or more) in ns") + DEV_POWER_SYNC_BALANCING_FREQ = (272, "Accumulated frequency of the GPU to be used for averaging") + DEV_POWER_SYNC_BALANCING_AF = (273, "Accumulated activity factor of the GPU to be used for averaging") + DEV_EDPP_MULTIPLIER = (274, "EDPp multiplier expressed as a percentage") + + PWR_SMOOTHING_PRIMARY_POWER_FLOOR = (275, "Current primary power floor value in Watts") + PWR_SMOOTHING_SECONDARY_POWER_FLOOR = (276, "Current secondary power floor value in Watts") + PWR_SMOOTHING_MIN_PRIMARY_FLOOR_ACT_OFFSET = (277, "Minimum primary floor activation offset value in Watts") + PWR_SMOOTHING_MIN_PRIMARY_FLOOR_ACT_POINT = (278, "Minimum primary floor activation point value in Watts") + PWR_SMOOTHING_WINDOW_MULTIPLIER = (279, "Window Multiplier value in ms") + PWR_SMOOTHING_DELAYED_PWR_SMOOTHING_SUPPORTED = (280, "Support (0/Not Supported or 1/Supported) for delayed power smoothing") + PWR_SMOOTHING_PROFILE_SECONDARY_POWER_FLOOR = (281, "Current secondary power floor value in Watts for a given profile") + PWR_SMOOTHING_PROFILE_PRIMARY_FLOOR_ACT_WIN_MULT = (282, "Current primary floor activation window multiplier value for a given profile") + PWR_SMOOTHING_PROFILE_PRIMARY_FLOOR_TAR_WIN_MULT = (283, "Current primary floor target window multiplier value for a given profile") + PWR_SMOOTHING_PROFILE_PRIMARY_FLOOR_ACT_OFFSET = (284, "Current primary floor activation offset value in Watts for a given profile") + PWR_SMOOTHING_ADMIN_OVERRIDE_SECONDARY_POWER_FLOOR = (285, "Current secondary power floor value in Watts for admin override") + PWR_SMOOTHING_ADMIN_OVERRIDE_PRIMARY_FLOOR_ACT_WIN_MULT = (286, "Current primary floor activation window multiplier value for admin override") + PWR_SMOOTHING_ADMIN_OVERRIDE_PRIMARY_FLOOR_TAR_WIN_MULT = (287, "Current primary floor target window multiplier value for admin override") + PWR_SMOOTHING_ADMIN_OVERRIDE_PRIMARY_FLOOR_ACT_OFFSET = (288, "Current primary floor activation offset value in Watts for admin override") MAX = 289 NVLINK_MAX_LINKS = 18 -class RUSD(_IntEnum): - POLL_NONE = 0x0 # Disable RUSD polling on all metric groups - POLL_CLOCK = 0x1 # Enable RUSD polling on clock group - POLL_PERF = 0x2 # Enable RUSD polling on performance group - POLL_MEMORY = 0x4 # Enable RUSD polling on memory group - POLL_POWER = 0x8 # Enable RUSD polling on power group - POLL_THERMAL = 0x10 # Enable RUSD polling on thermal group - POLL_PCI = 0x20 # Enable RUSD polling on pci group - POLL_FAN = 0x40 # Enable RUSD polling on fan group - POLL_PROC_UTIL = 0x80 # Enable RUSD polling on process utilization group - POLL_ALL = 0xFFFFFFFFFFFFFFFF # Enable RUSD polling on all groups +class RUSD(_FastEnum): + POLL_NONE = (0x0, "Disable RUSD polling on all metric groups") + POLL_CLOCK = (0x1, "Enable RUSD polling on clock group") + POLL_PERF = (0x2, "Enable RUSD polling on performance group") + POLL_MEMORY = (0x4, "Enable RUSD polling on memory group") + POLL_POWER = (0x8, "Enable RUSD polling on power group") + POLL_THERMAL = (0x10, "Enable RUSD polling on thermal group") + POLL_PCI = (0x20, "Enable RUSD polling on pci group") + POLL_FAN = (0x40, "Enable RUSD polling on fan group") + POLL_PROC_UTIL = (0x80, "Enable RUSD polling on process utilization group") + POLL_ALL = (0xFFFFFFFFFFFFFFFF, "Enable RUSD polling on all groups") -class PowerMizerMode(_IntEnum): - ADAPTIVE = 0 # Adjust GPU clocks based on GPU utilization - PREFER_MAXIMUM_PERFORMANCE = 1 # Raise GPU clocks to favor maximum performance, to the extent that thermal and other constraints allow - AUTO = 2 # PowerMizer mode is driver controlled - PREFER_CONSISTENT_PERFORMANCE = 3 # lock to GPU base clocks +class PowerMizerMode(_FastEnum): + ADAPTIVE = (0, "Adjust GPU clocks based on GPU utilization") + PREFER_MAXIMUM_PERFORMANCE = (1, "Raise GPU clocks to favor maximum performance, to the extent that thermal and other constraints allow") + AUTO = (2, "PowerMizer mode is driver controlled") + PREFER_CONSISTENT_PERFORMANCE = (3, "lock to GPU base clocks") -class DeviceArch(_IntEnum): +class DeviceArch(_FastEnum): KEPLER = 2 MAXWELL = 3 PASCAL = 4 @@ -1214,26 +1457,26 @@ class DeviceArch(_IntEnum): UNKNOWN = 0xFFFFFFFF -class BusType(_IntEnum): - UNKNOWN = 0 - PCI = 1 - PCIE = 2 - FPCI = 3 - AGP = 4 +class BusType(_FastEnum): + UNKNOWN = (0, "Unknown bus type") + PCI = (1, "PCI bus") + PCIE = (2, "PXI-Express bus") + FPCI = (3, "FPCI bus") + AGP = (4, "AGP bus") -class FanControlPolicy(_IntEnum): - TEMPERATURE_CONTINUOUS_SW = 0 # Temperature-controlled fan policy - MANUAL = 1 # Manual fan control policy +class FanControlPolicy(_FastEnum): + TEMPERATURE_CONTINUOUS_SW = (0, "Temperature-controlled fan policy") + MANUAL = (1, "Manual fan control policy") -class PowerSource(_IntEnum): +class PowerSource(_FastEnum): AC = 0x00000000 BATTERY = 0x00000001 UNDERSIZED = 0x00000002 -class PcieLinkMaxSpeed(_IntEnum): +class PcieLinkMaxSpeed(_FastEnum): SPEED_INVALID = 0x00000000 SPEED_2500MBPS = 0x00000001 SPEED_5000MBPS = 0x00000002 @@ -1243,7 +1486,7 @@ class PcieLinkMaxSpeed(_IntEnum): SPEED_64000MBPS = 0x00000006 -class AdaptiveClockingInfoStatus(_IntEnum): +class AdaptiveClockingInfoStatus(_FastEnum): DISABLED = 0x00000000 ENABLED = 0x00000001 @@ -1251,64 +1494,64 @@ class AdaptiveClockingInfoStatus(_IntEnum): MAX_GPU_UTILIZATIONS = 8 -class PcieAtomicsCap(_IntEnum): - FETCHADD32 = 0x01 - FETCHADD64 = 0x02 - SWAP32 = 0x04 - SWAP64 = 0x08 - CAS32 = 0x10 - CAS64 = 0x20 - CAS128 = 0x40 +class PcieAtomicsCap(_FastEnum): + FETCHADD32 = (0x01, "32-bit fetch and add") + FETCHADD64 = (0x02, "64-bit fetch and add") + SWAP32 = (0x04, "32-bit swap") + SWAP64 = (0x08, "64-bit swap") + CAS32 = (0x10, "32-bit compare and swap") + CAS64 = (0x20, "64-bit compare and swap") + CAS128 = (0x40, "128-bit compare and swap") MAX = 7 -class PowerScope(_IntEnum): - GPU = 0 - MODULE = 1 - MEMORY = 2 +class PowerScope(_FastEnum): + GPU = (0, "Targets only GPU") + MODULE = (1, "Targets the whole module") + MEMORY = (2, "Targets the GPU memory") # Need "Enum" suffix to disambiguate from nvmlGridLicenseExpiry_t -class GridLicenseExpiryEnum(_IntEnum): - NOT_AVAILABLE = 0 - INVALID = 1 - VALID = 2 - NOT_APPLICABLE = 3 - PERMANENT = 4 +class GridLicenseExpiryEnum(_FastEnum): + NOT_AVAILABLE = (0, "Expiry information not available") + INVALID = (1, "Invalid expiry or error fetching expiry") + VALID = (2, "Valid expiry") + NOT_APPLICABLE = (3, "Expiry not applicable") + PERMANENT = (4, "Permanent expiry") GRID_LICENSE_FEATURE_MAX_COUNT = 3 -class VgpuVirtualizationCapMigration(_IntEnum): +class VgpuVirtualizationCapMigration(_FastEnum): NO = 0x0 YES = 0x1 -class VgpuPgpuVirtualizationCapMigration(_IntEnum): +class VgpuPgpuVirtualizationCapMigration(_FastEnum): NO = 0x0 YES = 0x1 -class VgpuSchedulerPolicy(_IntEnum): +class VgpuSchedulerPolicy(_FastEnum): UNKNOWN = 0 BEST_EFFORT = 1 EQUAL_SHARE = 2 FIXED_SHARE = 3 -class VgpuSchedulerArr(_IntEnum): +class VgpuSchedulerArr(_FastEnum): DEFAULT = 0 DISABLE = 1 ENABLE = 2 -class VgpuSchedulerEngineType(_IntEnum): +class VgpuSchedulerEngineType(_FastEnum): GRAPHICS = 1 NVENC1 = 2 -class GridLicenseState(_IntEnum): +class GridLicenseState(_FastEnum): UNKNOWN = 0 UNINITIALIZED = 1 UNLICENSED_UNRESTRICTED = 2 @@ -1317,29 +1560,29 @@ class GridLicenseState(_IntEnum): LICENSED = 5 -class NvlinkLowPowerThresholdUnit(_IntEnum): +class NvlinkLowPowerThresholdUnit(_FastEnum): UNIT_100US = 0x0 UNIT_50US = 0x1 -class NvlinkPowerState(_IntEnum): +class NvlinkPowerState(_FastEnum): HIGH_SPEED = 0x0 LOW_SPEED = 0x1 -class NvlinkLowPowerThreshold(_IntEnum): +class NvlinkLowPowerThreshold(_FastEnum): MIN = 0x1 MAX = 0x1FFF RESET = 0xFFFFFFFF DEFAULT = 0xFFFFFFFF -class C2CPowerState(_IntEnum): +class C2CPowerState(_FastEnum): FULL_POWER = 0 LOW_POWER = 1 -class EventType(_IntEnum): +class EventType(_FastEnum): NONE = 0x0000000000000000 SINGLE_BIT_ECC_ERROR = 0x0000000000000001 DOUBLE_BIT_ECC_ERROR = 0x0000000000000002 @@ -1357,12 +1600,12 @@ class EventType(_IntEnum): GPU_RECOVERY_ACTION = 0x0000000000008000 -class SystemEventType(_IntEnum): +class SystemEventType(_FastEnum): GPU_DRIVER_UNBIND = 0x0000000000000001 GPU_DRIVER_BIND = 0x0000000000000002 -class ClocksEventReasons(_IntEnum): +class ClocksEventReasons(_FastEnum): EVENT_REASON_GPU_IDLE = 0x0000000000000001 EVENT_REASON_APPLICATIONS_CLOCKS_SETTING = 0x0000000000000002 EVENT_REASON_SW_POWER_CAP = 0x0000000000000004 @@ -1375,14 +1618,14 @@ class ClocksEventReasons(_IntEnum): EVENT_REASON_NONE = 0x0000000000000000 -class EncoderQuery(_IntEnum): +class EncoderQuery(_FastEnum): H264 = 0x00 HEVC = 0x01 AV1 = 0x02 UNKNOWN = 0xFF -class NvFBCSessionFlag(_IntEnum): +class NvFBCSessionFlag(_FastEnum): DIFFMAP_ENABLED = 0x00000001 CLASSIFICATIONMAP_ENABLED = 0x00000002 CAPTURE_WITH_WAIT_NO_WAIT = 0x00000004 @@ -1390,7 +1633,7 @@ class NvFBCSessionFlag(_IntEnum): CAPTURE_WITH_WAIT_TIMEOUT = 0x00000010 -class CCSystemCpuCaps(_IntEnum): +class CCSystemCpuCaps(_FastEnum): NONE = 0 AMD_SEV = 1 INTEL_TDX = 2 @@ -1398,70 +1641,70 @@ class CCSystemCpuCaps(_IntEnum): AMD_SNP_VTOM = 4 -class CCSystemGpus(_IntEnum): +class CCSystemGpus(_FastEnum): CC_NOT_CAPABLE = 0 CC_CAPABLE = 1 -class CCSystemDevtoolsMode(_IntEnum): +class CCSystemDevtoolsMode(_FastEnum): OFF = 0 ON = 1 -class CCSystemEnvironment(_IntEnum): +class CCSystemEnvironment(_FastEnum): UNAVAILABLE = 0 SIM = 1 PROD = 2 -class CCSystemFeature(_IntEnum): +class CCSystemFeature(_FastEnum): DISABLED = 0 ENABLED = 1 -class CCSystemMultiGpu(_IntEnum): +class CCSystemMultiGpu(_FastEnum): NONE = 0 PROTECTED_PCIE = 1 NVLE = 2 -class CCAcceptingClientRequests(_IntEnum): +class CCAcceptingClientRequests(_FastEnum): FALSE = 0 TRUE = 1 -class GpuFabricState(_IntEnum): +class GpuFabricState(_FastEnum): NOT_SUPPORTED = 0 NOT_STARTED = 1 IN_PROGRESS = 2 COMPLETED = 3 -class GpuFabricHealthMaskDegradedBw(_IntEnum): +class GpuFabricHealthMaskDegradedBw(_FastEnum): NOT_SUPPORTED = 0 TRUE = 1 FALSE = 2 -class GpuFabricHealthMaskRouteRecovery(_IntEnum): +class GpuFabricHealthMaskRouteRecovery(_FastEnum): NOT_SUPPORTED = 0 TRUE = 1 FALSE = 2 -class GpuFabricHealthMaskRouteUnhealthy(_IntEnum): +class GpuFabricHealthMaskRouteUnhealthy(_FastEnum): NOT_SUPPORTED = 0 TRUE = 1 FALSE = 2 -class GpuFabricHealthMaskAccessTimeout(_IntEnum): +class GpuFabricHealthMaskAccessTimeout(_FastEnum): NOT_SUPPORTED = 0 TRUE = 1 FALSE = 2 -class GpuFabricHealthMaskIncorrectConfiguration(_IntEnum): +class GpuFabricHealthMaskIncorrectConfiguration(_FastEnum): NOT_SUPPORTED = 0 NONE = 1 INCORRECT_SYSGUID = 2 @@ -1472,25 +1715,25 @@ class GpuFabricHealthMaskIncorrectConfiguration(_IntEnum): INVALID_LOCATION = 7 -class GpuFabricHealthSummary(_IntEnum): +class GpuFabricHealthSummary(_FastEnum): NOT_SUPPORTED = 0 HEALTHY = 1 UNHEALTHY = 2 LIMITED_CAPACITY = 3 -class InitFlag(_IntEnum): +class InitFlag(_FastEnum): NO_GPUS = 1 NO_ATTACH = 2 -class NvlinkState(_IntEnum): +class NvlinkState(_FastEnum): INACTIVE = 0x0 ACTIVE = 0x1 SLEEP = 0x2 -class NvlinkFirmwareUcodeType(_IntEnum): +class NvlinkFirmwareUcodeType(_FastEnum): MSE = 0x1 NETIR = 0x2 NETIR_UPHY = 0x3 @@ -1498,12 +1741,12 @@ class NvlinkFirmwareUcodeType(_IntEnum): NETIR_DLN = 0x5 -class DeviceMig(_IntEnum): +class DeviceMig(_FastEnum): DISABLE = 0 ENABLE = 1 -class GpuInstanceProfile(_IntEnum): +class GpuInstanceProfile(_FastEnum): PROFILE_1_SLICE = 0x0 PROFILE_2_SLICE = 0x1 PROFILE_3_SLICE = 0x2 @@ -1524,16 +1767,16 @@ class GpuInstanceProfile(_IntEnum): PROFILE_COUNT = 0x11 -class GpuInstanceProfileCaps(_IntEnum): +class GpuInstanceProfileCaps(_FastEnum): P2P = 0x1 GFX = 0x2 -class ComputeInstanceProfileCaps(_IntEnum): +class ComputeInstanceProfileCaps(_FastEnum): GFX = 0x1 -class ComputeInstanceProfile(_IntEnum): +class ComputeInstanceProfile(_FastEnum): PROFILE_1_SLICE = 0x0 PROFILE_2_SLICE = 0x1 PROFILE_3_SLICE = 0x2 @@ -1545,12 +1788,12 @@ class ComputeInstanceProfile(_IntEnum): PROFILE_COUNT = 0x8 -class ComputeInstanceEngineProfile(_IntEnum): +class ComputeInstanceEngineProfile(_FastEnum): SHARED = 0x0 COUNT = 0x1 -class PowerSmoothingProfileParam(_IntEnum): +class PowerSmoothingProfileParam(_FastEnum): PERCENT_TMP_FLOOR = 0 RAMP_UP_RATE = 1 RAMP_DOWN_RATE = 2 @@ -1561,7 +1804,7 @@ class PowerSmoothingProfileParam(_IntEnum): PRIMARY_FLOOR_ACT_OFFSET = 7 -class VgpuPgpu(_IntEnum): +class VgpuPgpu(_FastEnum): HETEROGENEOUS_MODE = 0 # Heterogeneous vGPU mode. HOMOGENEOUS_MODE = 1 # Homogeneous vGPU mode. diff --git a/cuda_bindings/cuda/bindings/nvrtc.pyx.in b/cuda_bindings/cuda/bindings/nvrtc.pyx.in index 913d913008..9f5949f4b5 100644 --- a/cuda_bindings/cuda/bindings/nvrtc.pyx.in +++ b/cuda_bindings/cuda/bindings/nvrtc.pyx.in @@ -3,7 +3,6 @@ # This code was automatically generated with version 13.1.0. Do not modify it directly. from typing import Any, Optional -from enum import IntEnum import cython import ctypes from libc.stdlib cimport calloc, malloc, free @@ -14,6 +13,7 @@ from libc.limits cimport CHAR_MIN from libcpp.vector cimport vector from cpython.buffer cimport PyObject_CheckBuffer, PyObject_GetBuffer, PyBuffer_Release, PyBUF_SIMPLE, PyBUF_ANY_CONTIGUOUS from cpython.bytes cimport PyBytes_FromStringAndSize +from ._internal._fast_enum import FastEnum as _FastEnum import cuda.bindings.driver as _driver _driver = _driver.__dict__ @@ -46,7 +46,7 @@ ctypedef unsigned long long void_ptr {{if 'nvrtcResult' in found_types}} -class nvrtcResult(IntEnum): +class nvrtcResult(_FastEnum): """ The enumerated type nvrtcResult defines API call result codes. NVRTC API functions return nvrtcResult to indicate the call result. @@ -88,7 +88,6 @@ class nvrtcResult(IntEnum): {{if 'NVRTC_ERROR_TIME_TRACE_FILE_WRITE_FAILED' in found_values}} NVRTC_ERROR_TIME_TRACE_FILE_WRITE_FAILED = cynvrtc.nvrtcResult.NVRTC_ERROR_TIME_TRACE_FILE_WRITE_FAILED{{endif}} -_dict_nvrtcResult = dict(((int(v), v) for k, v in nvrtcResult.__members__.items())) {{endif}} {{if 'nvrtcProgram' in found_types}} @@ -172,8 +171,8 @@ def nvrtcVersion(): with nogil: err = cynvrtc.nvrtcVersion(&major, &minor) if err != cynvrtc.NVRTC_SUCCESS: - return (_dict_nvrtcResult[err], None, None) - return (_dict_nvrtcResult[err], major, minor) + return (nvrtcResult(err), None, None) + return (nvrtcResult(err), major, minor) {{endif}} {{if 'nvrtcGetNumSupportedArchs' in found_functions}} @@ -196,8 +195,8 @@ def nvrtcGetNumSupportedArchs(): with nogil: err = cynvrtc.nvrtcGetNumSupportedArchs(&numArchs) if err != cynvrtc.NVRTC_SUCCESS: - return (_dict_nvrtcResult[err], None) - return (_dict_nvrtcResult[err], numArchs) + return (nvrtcResult(err), None) + return (nvrtcResult(err), numArchs) {{endif}} {{if 'nvrtcGetSupportedArchs' in found_functions}} @@ -223,8 +222,8 @@ def nvrtcGetSupportedArchs(): with nogil: err = cynvrtc.nvrtcGetSupportedArchs(supportedArchs.data()) if err != cynvrtc.NVRTC_SUCCESS: - return (_dict_nvrtcResult[err], None) - return (_dict_nvrtcResult[err], supportedArchs) + return (nvrtcResult(err), None) + return (nvrtcResult(err), supportedArchs) {{endif}} {{if 'nvrtcCreateProgram' in found_functions}} @@ -281,8 +280,8 @@ def nvrtcCreateProgram(char* src, char* name, int numHeaders, headers : Optional with nogil: err = cynvrtc.nvrtcCreateProgram(prog._pvt_ptr, src, name, numHeaders, cyheaders.data(), cyincludeNames.data()) if err != cynvrtc.NVRTC_SUCCESS: - return (_dict_nvrtcResult[err], None) - return (_dict_nvrtcResult[err], prog) + return (nvrtcResult(err), None) + return (nvrtcResult(err), prog) {{endif}} {{if 'nvrtcDestroyProgram' in found_functions}} @@ -318,7 +317,7 @@ def nvrtcDestroyProgram(prog): raise TypeError("Argument 'prog' is not instance of type (expected , found " + str(type(prog))) with nogil: err = cynvrtc.nvrtcDestroyProgram(cyprog) - return (_dict_nvrtcResult[err],) + return (nvrtcResult(err),) {{endif}} {{if 'nvrtcCompileProgram' in found_functions}} @@ -368,7 +367,7 @@ def nvrtcCompileProgram(prog, int numOptions, options : Optional[tuple[bytes] | cdef vector[const char*] cyoptions = options with nogil: err = cynvrtc.nvrtcCompileProgram(cyprog, numOptions, cyoptions.data()) - return (_dict_nvrtcResult[err],) + return (nvrtcResult(err),) {{endif}} {{if 'nvrtcGetPTXSize' in found_functions}} @@ -407,8 +406,8 @@ def nvrtcGetPTXSize(prog): with nogil: err = cynvrtc.nvrtcGetPTXSize(cyprog, &ptxSizeRet) if err != cynvrtc.NVRTC_SUCCESS: - return (_dict_nvrtcResult[err], None) - return (_dict_nvrtcResult[err], ptxSizeRet) + return (nvrtcResult(err), None) + return (nvrtcResult(err), ptxSizeRet) {{endif}} {{if 'nvrtcGetPTX' in found_functions}} @@ -445,7 +444,7 @@ def nvrtcGetPTX(prog, char* ptx): cyprog = pprog with nogil: err = cynvrtc.nvrtcGetPTX(cyprog, ptx) - return (_dict_nvrtcResult[err],) + return (nvrtcResult(err),) {{endif}} {{if 'nvrtcGetCUBINSize' in found_functions}} @@ -484,8 +483,8 @@ def nvrtcGetCUBINSize(prog): with nogil: err = cynvrtc.nvrtcGetCUBINSize(cyprog, &cubinSizeRet) if err != cynvrtc.NVRTC_SUCCESS: - return (_dict_nvrtcResult[err], None) - return (_dict_nvrtcResult[err], cubinSizeRet) + return (nvrtcResult(err), None) + return (nvrtcResult(err), cubinSizeRet) {{endif}} {{if 'nvrtcGetCUBIN' in found_functions}} @@ -522,7 +521,7 @@ def nvrtcGetCUBIN(prog, char* cubin): cyprog = pprog with nogil: err = cynvrtc.nvrtcGetCUBIN(cyprog, cubin) - return (_dict_nvrtcResult[err],) + return (nvrtcResult(err),) {{endif}} {{if 'nvrtcGetLTOIRSize' in found_functions}} @@ -561,8 +560,8 @@ def nvrtcGetLTOIRSize(prog): with nogil: err = cynvrtc.nvrtcGetLTOIRSize(cyprog, <OIRSizeRet) if err != cynvrtc.NVRTC_SUCCESS: - return (_dict_nvrtcResult[err], None) - return (_dict_nvrtcResult[err], LTOIRSizeRet) + return (nvrtcResult(err), None) + return (nvrtcResult(err), LTOIRSizeRet) {{endif}} {{if 'nvrtcGetLTOIR' in found_functions}} @@ -599,7 +598,7 @@ def nvrtcGetLTOIR(prog, char* LTOIR): cyprog = pprog with nogil: err = cynvrtc.nvrtcGetLTOIR(cyprog, LTOIR) - return (_dict_nvrtcResult[err],) + return (nvrtcResult(err),) {{endif}} {{if 'nvrtcGetOptiXIRSize' in found_functions}} @@ -638,8 +637,8 @@ def nvrtcGetOptiXIRSize(prog): with nogil: err = cynvrtc.nvrtcGetOptiXIRSize(cyprog, &optixirSizeRet) if err != cynvrtc.NVRTC_SUCCESS: - return (_dict_nvrtcResult[err], None) - return (_dict_nvrtcResult[err], optixirSizeRet) + return (nvrtcResult(err), None) + return (nvrtcResult(err), optixirSizeRet) {{endif}} {{if 'nvrtcGetOptiXIR' in found_functions}} @@ -676,7 +675,7 @@ def nvrtcGetOptiXIR(prog, char* optixir): cyprog = pprog with nogil: err = cynvrtc.nvrtcGetOptiXIR(cyprog, optixir) - return (_dict_nvrtcResult[err],) + return (nvrtcResult(err),) {{endif}} {{if 'nvrtcGetProgramLogSize' in found_functions}} @@ -718,8 +717,8 @@ def nvrtcGetProgramLogSize(prog): with nogil: err = cynvrtc.nvrtcGetProgramLogSize(cyprog, &logSizeRet) if err != cynvrtc.NVRTC_SUCCESS: - return (_dict_nvrtcResult[err], None) - return (_dict_nvrtcResult[err], logSizeRet) + return (nvrtcResult(err), None) + return (nvrtcResult(err), logSizeRet) {{endif}} {{if 'nvrtcGetProgramLog' in found_functions}} @@ -756,7 +755,7 @@ def nvrtcGetProgramLog(prog, char* log): cyprog = pprog with nogil: err = cynvrtc.nvrtcGetProgramLog(cyprog, log) - return (_dict_nvrtcResult[err],) + return (nvrtcResult(err),) {{endif}} {{if 'nvrtcAddNameExpression' in found_functions}} @@ -798,7 +797,7 @@ def nvrtcAddNameExpression(prog, char* name_expression): cyprog = pprog with nogil: err = cynvrtc.nvrtcAddNameExpression(cyprog, name_expression) - return (_dict_nvrtcResult[err],) + return (nvrtcResult(err),) {{endif}} {{if 'nvrtcGetLoweredName' in found_functions}} @@ -842,8 +841,8 @@ def nvrtcGetLoweredName(prog, char* name_expression): with nogil: err = cynvrtc.nvrtcGetLoweredName(cyprog, name_expression, &lowered_name) if err != cynvrtc.NVRTC_SUCCESS: - return (_dict_nvrtcResult[err], None) - return (_dict_nvrtcResult[err], lowered_name if lowered_name != NULL else None) + return (nvrtcResult(err), None) + return (nvrtcResult(err), lowered_name if lowered_name != NULL else None) {{endif}} {{if 'nvrtcGetPCHHeapSize' in found_functions}} @@ -864,8 +863,8 @@ def nvrtcGetPCHHeapSize(): with nogil: err = cynvrtc.nvrtcGetPCHHeapSize(&ret) if err != cynvrtc.NVRTC_SUCCESS: - return (_dict_nvrtcResult[err], None) - return (_dict_nvrtcResult[err], ret) + return (nvrtcResult(err), None) + return (nvrtcResult(err), ret) {{endif}} {{if 'nvrtcSetPCHHeapSize' in found_functions}} @@ -890,7 +889,7 @@ def nvrtcSetPCHHeapSize(size_t size): """ with nogil: err = cynvrtc.nvrtcSetPCHHeapSize(size) - return (_dict_nvrtcResult[err],) + return (nvrtcResult(err),) {{endif}} {{if 'nvrtcGetPCHCreateStatus' in found_functions}} @@ -938,7 +937,7 @@ def nvrtcGetPCHCreateStatus(prog): cyprog = pprog with nogil: err = cynvrtc.nvrtcGetPCHCreateStatus(cyprog) - return (_dict_nvrtcResult[err],) + return (nvrtcResult(err),) {{endif}} {{if 'nvrtcGetPCHHeapSizeRequired' in found_functions}} @@ -974,8 +973,8 @@ def nvrtcGetPCHHeapSizeRequired(prog): with nogil: err = cynvrtc.nvrtcGetPCHHeapSizeRequired(cyprog, &size) if err != cynvrtc.NVRTC_SUCCESS: - return (_dict_nvrtcResult[err], None) - return (_dict_nvrtcResult[err], size) + return (nvrtcResult(err), None) + return (nvrtcResult(err), size) {{endif}} {{if 'nvrtcSetFlowCallback' in found_functions}} @@ -1036,7 +1035,7 @@ def nvrtcSetFlowCallback(prog, callback, payload): cdef void* cypayload_ptr = cypayload.cptr with nogil: err = cynvrtc.nvrtcSetFlowCallback(cyprog, cycallback_ptr, cypayload_ptr) - return (_dict_nvrtcResult[err],) + return (nvrtcResult(err),) {{endif}} @cython.embedsignature(True) diff --git a/cuda_bindings/cuda/bindings/nvvm.pyx b/cuda_bindings/cuda/bindings/nvvm.pyx index bab2dfc3b9..2f55020235 100644 --- a/cuda_bindings/cuda/bindings/nvvm.pyx +++ b/cuda_bindings/cuda/bindings/nvvm.pyx @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE # @@ -9,7 +9,7 @@ cimport cython # NOQA from ._internal.utils cimport (get_buffer_pointer, get_nested_resource_ptr, nested_resource) -from enum import IntEnum as _IntEnum +from cuda.bindings._internal._fast_enum import FastEnum as _IntEnum ############################################################################### @@ -17,7 +17,11 @@ from enum import IntEnum as _IntEnum ############################################################################### class Result(_IntEnum): - """See `nvvmResult`.""" + """ + NVVM API call result code. + + See `nvvmResult`. + """ SUCCESS = NVVM_SUCCESS ERROR_OUT_OF_MEMORY = NVVM_ERROR_OUT_OF_MEMORY ERROR_PROGRAM_CREATION_FAILURE = NVVM_ERROR_PROGRAM_CREATION_FAILURE diff --git a/cuda_bindings/cuda/bindings/runtime.pyx.in b/cuda_bindings/cuda/bindings/runtime.pyx.in index 66517b201e..d47832656e 100644 --- a/cuda_bindings/cuda/bindings/runtime.pyx.in +++ b/cuda_bindings/cuda/bindings/runtime.pyx.in @@ -3,7 +3,6 @@ # This code was automatically generated with version 13.1.0. Do not modify it directly. from typing import Any, Optional -from enum import IntEnum import cython import ctypes from libc.stdlib cimport calloc, malloc, free @@ -14,6 +13,7 @@ from libc.limits cimport CHAR_MIN from libcpp.vector cimport vector from cpython.buffer cimport PyObject_CheckBuffer, PyObject_GetBuffer, PyBuffer_Release, PyBUF_SIMPLE, PyBUF_ANY_CONTIGUOUS from cpython.bytes cimport PyBytes_FromStringAndSize +from ._internal._fast_enum import FastEnum as _FastEnum import cuda.bindings.driver from libcpp.map cimport map @@ -339,891 +339,1142 @@ CUDA_EGL_MAX_PLANES = cyruntime.CUDA_EGL_MAX_PLANES {{if 'cudaError' in found_types}} -class cudaError_t(IntEnum): +class cudaError_t(_FastEnum): """ impl_private CUDA error types """ {{if 'cudaSuccess' in found_values}} - #: The API call returned with no errors. In the case of query calls, - #: this also means that the operation being queried is complete (see - #: :py:obj:`~.cudaEventQuery()` and :py:obj:`~.cudaStreamQuery()`). - cudaSuccess = cyruntime.cudaError.cudaSuccess{{endif}} + cudaSuccess = ( + cyruntime.cudaError.cudaSuccess, + 'The API call returned with no errors. In the case of query calls, this also\n' + 'means that the operation being queried is complete (see\n' + ':py:obj:`~.cudaEventQuery()` and :py:obj:`~.cudaStreamQuery()`).\n' + ){{endif}} {{if 'cudaErrorInvalidValue' in found_values}} - #: This indicates that one or more of the parameters passed to the API - #: call is not within an acceptable range of values. - cudaErrorInvalidValue = cyruntime.cudaError.cudaErrorInvalidValue{{endif}} + cudaErrorInvalidValue = ( + cyruntime.cudaError.cudaErrorInvalidValue, + 'This indicates that one or more of the parameters passed to the API call is\n' + 'not within an acceptable range of values.\n' + ){{endif}} {{if 'cudaErrorMemoryAllocation' in found_values}} - #: The API call failed because it was unable to allocate enough memory - #: or other resources to perform the requested operation. - cudaErrorMemoryAllocation = cyruntime.cudaError.cudaErrorMemoryAllocation{{endif}} + cudaErrorMemoryAllocation = ( + cyruntime.cudaError.cudaErrorMemoryAllocation, + 'The API call failed because it was unable to allocate enough memory or\n' + 'other resources to perform the requested operation.\n' + ){{endif}} {{if 'cudaErrorInitializationError' in found_values}} - #: The API call failed because the CUDA driver and runtime could not be - #: initialized. - cudaErrorInitializationError = cyruntime.cudaError.cudaErrorInitializationError{{endif}} + cudaErrorInitializationError = ( + cyruntime.cudaError.cudaErrorInitializationError, + 'The API call failed because the CUDA driver and runtime could not be\n' + 'initialized.\n' + ){{endif}} {{if 'cudaErrorCudartUnloading' in found_values}} - #: This indicates that a CUDA Runtime API call cannot be executed - #: because it is being called during process shut down, at a point in - #: time after CUDA driver has been unloaded. - cudaErrorCudartUnloading = cyruntime.cudaError.cudaErrorCudartUnloading{{endif}} + cudaErrorCudartUnloading = ( + cyruntime.cudaError.cudaErrorCudartUnloading, + 'This indicates that a CUDA Runtime API call cannot be executed because it\n' + 'is being called during process shut down, at a point in time after CUDA\n' + 'driver has been unloaded.\n' + ){{endif}} {{if 'cudaErrorProfilerDisabled' in found_values}} - #: This indicates profiler is not initialized for this run. This can - #: happen when the application is running with external profiling tools - #: like visual profiler. - cudaErrorProfilerDisabled = cyruntime.cudaError.cudaErrorProfilerDisabled{{endif}} + cudaErrorProfilerDisabled = ( + cyruntime.cudaError.cudaErrorProfilerDisabled, + 'This indicates profiler is not initialized for this run. This can happen\n' + 'when the application is running with external profiling tools like visual\n' + 'profiler.\n' + ){{endif}} {{if 'cudaErrorProfilerNotInitialized' in found_values}} - #: [Deprecated] - cudaErrorProfilerNotInitialized = cyruntime.cudaError.cudaErrorProfilerNotInitialized{{endif}} + cudaErrorProfilerNotInitialized = ( + cyruntime.cudaError.cudaErrorProfilerNotInitialized, + '[Deprecated]\n' + ){{endif}} {{if 'cudaErrorProfilerAlreadyStarted' in found_values}} - #: [Deprecated] - cudaErrorProfilerAlreadyStarted = cyruntime.cudaError.cudaErrorProfilerAlreadyStarted{{endif}} + cudaErrorProfilerAlreadyStarted = ( + cyruntime.cudaError.cudaErrorProfilerAlreadyStarted, + '[Deprecated]\n' + ){{endif}} {{if 'cudaErrorProfilerAlreadyStopped' in found_values}} - #: [Deprecated] - cudaErrorProfilerAlreadyStopped = cyruntime.cudaError.cudaErrorProfilerAlreadyStopped{{endif}} + cudaErrorProfilerAlreadyStopped = ( + cyruntime.cudaError.cudaErrorProfilerAlreadyStopped, + '[Deprecated]\n' + ){{endif}} {{if 'cudaErrorInvalidConfiguration' in found_values}} - #: This indicates that a kernel launch is requesting resources that can - #: never be satisfied by the current device. Requesting more shared - #: memory per block than the device supports will trigger this error, - #: as will requesting too many threads or blocks. See - #: :py:obj:`~.cudaDeviceProp` for more device limitations. - cudaErrorInvalidConfiguration = cyruntime.cudaError.cudaErrorInvalidConfiguration{{endif}} + cudaErrorInvalidConfiguration = ( + cyruntime.cudaError.cudaErrorInvalidConfiguration, + 'This indicates that a kernel launch is requesting resources that can never\n' + 'be satisfied by the current device. Requesting more shared memory per block\n' + 'than the device supports will trigger this error, as will requesting too\n' + 'many threads or blocks. See :py:obj:`~.cudaDeviceProp` for more device\n' + 'limitations.\n' + ){{endif}} {{if 'cudaErrorInvalidPitchValue' in found_values}} - #: This indicates that one or more of the pitch-related parameters - #: passed to the API call is not within the acceptable range for pitch. - cudaErrorInvalidPitchValue = cyruntime.cudaError.cudaErrorInvalidPitchValue{{endif}} + cudaErrorInvalidPitchValue = ( + cyruntime.cudaError.cudaErrorInvalidPitchValue, + 'This indicates that one or more of the pitch-related parameters passed to\n' + 'the API call is not within the acceptable range for pitch.\n' + ){{endif}} {{if 'cudaErrorInvalidSymbol' in found_values}} - #: This indicates that the symbol name/identifier passed to the API - #: call is not a valid name or identifier. - cudaErrorInvalidSymbol = cyruntime.cudaError.cudaErrorInvalidSymbol{{endif}} + cudaErrorInvalidSymbol = ( + cyruntime.cudaError.cudaErrorInvalidSymbol, + 'This indicates that the symbol name/identifier passed to the API call is\n' + 'not a valid name or identifier.\n' + ){{endif}} {{if 'cudaErrorInvalidHostPointer' in found_values}} - #: This indicates that at least one host pointer passed to the API call - #: is not a valid host pointer. [Deprecated] - cudaErrorInvalidHostPointer = cyruntime.cudaError.cudaErrorInvalidHostPointer{{endif}} + cudaErrorInvalidHostPointer = ( + cyruntime.cudaError.cudaErrorInvalidHostPointer, + 'This indicates that at least one host pointer passed to the API call is not\n' + 'a valid host pointer. [Deprecated]\n' + ){{endif}} {{if 'cudaErrorInvalidDevicePointer' in found_values}} - #: This indicates that at least one device pointer passed to the API - #: call is not a valid device pointer. [Deprecated] - cudaErrorInvalidDevicePointer = cyruntime.cudaError.cudaErrorInvalidDevicePointer{{endif}} + cudaErrorInvalidDevicePointer = ( + cyruntime.cudaError.cudaErrorInvalidDevicePointer, + 'This indicates that at least one device pointer passed to the API call is\n' + 'not a valid device pointer. [Deprecated]\n' + ){{endif}} {{if 'cudaErrorInvalidTexture' in found_values}} - #: This indicates that the texture passed to the API call is not a - #: valid texture. - cudaErrorInvalidTexture = cyruntime.cudaError.cudaErrorInvalidTexture{{endif}} + cudaErrorInvalidTexture = ( + cyruntime.cudaError.cudaErrorInvalidTexture, + 'This indicates that the texture passed to the API call is not a valid\n' + 'texture.\n' + ){{endif}} {{if 'cudaErrorInvalidTextureBinding' in found_values}} - #: This indicates that the texture binding is not valid. This occurs if - #: you call :py:obj:`~.cudaGetTextureAlignmentOffset()` with an unbound - #: texture. - cudaErrorInvalidTextureBinding = cyruntime.cudaError.cudaErrorInvalidTextureBinding{{endif}} + cudaErrorInvalidTextureBinding = ( + cyruntime.cudaError.cudaErrorInvalidTextureBinding, + 'This indicates that the texture binding is not valid. This occurs if you\n' + 'call :py:obj:`~.cudaGetTextureAlignmentOffset()` with an unbound texture.\n' + ){{endif}} {{if 'cudaErrorInvalidChannelDescriptor' in found_values}} - #: This indicates that the channel descriptor passed to the API call is - #: not valid. This occurs if the format is not one of the formats - #: specified by :py:obj:`~.cudaChannelFormatKind`, or if one of the - #: dimensions is invalid. - cudaErrorInvalidChannelDescriptor = cyruntime.cudaError.cudaErrorInvalidChannelDescriptor{{endif}} + cudaErrorInvalidChannelDescriptor = ( + cyruntime.cudaError.cudaErrorInvalidChannelDescriptor, + 'This indicates that the channel descriptor passed to the API call is not\n' + 'valid. This occurs if the format is not one of the formats specified by\n' + ':py:obj:`~.cudaChannelFormatKind`, or if one of the dimensions is invalid.\n' + ){{endif}} {{if 'cudaErrorInvalidMemcpyDirection' in found_values}} - #: This indicates that the direction of the memcpy passed to the API - #: call is not one of the types specified by - #: :py:obj:`~.cudaMemcpyKind`. - cudaErrorInvalidMemcpyDirection = cyruntime.cudaError.cudaErrorInvalidMemcpyDirection{{endif}} + cudaErrorInvalidMemcpyDirection = ( + cyruntime.cudaError.cudaErrorInvalidMemcpyDirection, + 'This indicates that the direction of the memcpy passed to the API call is\n' + 'not one of the types specified by :py:obj:`~.cudaMemcpyKind`.\n' + ){{endif}} {{if 'cudaErrorAddressOfConstant' in found_values}} - #: This indicated that the user has taken the address of a constant - #: variable, which was forbidden up until the CUDA 3.1 release. - #: [Deprecated] - cudaErrorAddressOfConstant = cyruntime.cudaError.cudaErrorAddressOfConstant{{endif}} + cudaErrorAddressOfConstant = ( + cyruntime.cudaError.cudaErrorAddressOfConstant, + 'This indicated that the user has taken the address of a constant variable,\n' + 'which was forbidden up until the CUDA 3.1 release. [Deprecated]\n' + ){{endif}} {{if 'cudaErrorTextureFetchFailed' in found_values}} - #: This indicated that a texture fetch was not able to be performed. - #: This was previously used for device emulation of texture operations. - #: [Deprecated] - cudaErrorTextureFetchFailed = cyruntime.cudaError.cudaErrorTextureFetchFailed{{endif}} + cudaErrorTextureFetchFailed = ( + cyruntime.cudaError.cudaErrorTextureFetchFailed, + 'This indicated that a texture fetch was not able to be performed. This was\n' + 'previously used for device emulation of texture operations. [Deprecated]\n' + ){{endif}} {{if 'cudaErrorTextureNotBound' in found_values}} - #: This indicated that a texture was not bound for access. This was - #: previously used for device emulation of texture operations. - #: [Deprecated] - cudaErrorTextureNotBound = cyruntime.cudaError.cudaErrorTextureNotBound{{endif}} + cudaErrorTextureNotBound = ( + cyruntime.cudaError.cudaErrorTextureNotBound, + 'This indicated that a texture was not bound for access. This was previously\n' + 'used for device emulation of texture operations. [Deprecated]\n' + ){{endif}} {{if 'cudaErrorSynchronizationError' in found_values}} - #: This indicated that a synchronization operation had failed. This was - #: previously used for some device emulation functions. [Deprecated] - cudaErrorSynchronizationError = cyruntime.cudaError.cudaErrorSynchronizationError{{endif}} + cudaErrorSynchronizationError = ( + cyruntime.cudaError.cudaErrorSynchronizationError, + 'This indicated that a synchronization operation had failed. This was\n' + 'previously used for some device emulation functions. [Deprecated]\n' + ){{endif}} {{if 'cudaErrorInvalidFilterSetting' in found_values}} - #: This indicates that a non-float texture was being accessed with - #: linear filtering. This is not supported by CUDA. - cudaErrorInvalidFilterSetting = cyruntime.cudaError.cudaErrorInvalidFilterSetting{{endif}} + cudaErrorInvalidFilterSetting = ( + cyruntime.cudaError.cudaErrorInvalidFilterSetting, + 'This indicates that a non-float texture was being accessed with linear\n' + 'filtering. This is not supported by CUDA.\n' + ){{endif}} {{if 'cudaErrorInvalidNormSetting' in found_values}} - #: This indicates that an attempt was made to read an unsupported data - #: type as a normalized float. This is not supported by CUDA. - cudaErrorInvalidNormSetting = cyruntime.cudaError.cudaErrorInvalidNormSetting{{endif}} + cudaErrorInvalidNormSetting = ( + cyruntime.cudaError.cudaErrorInvalidNormSetting, + 'This indicates that an attempt was made to read an unsupported data type as\n' + 'a normalized float. This is not supported by CUDA.\n' + ){{endif}} {{if 'cudaErrorMixedDeviceExecution' in found_values}} - #: Mixing of device and device emulation code was not allowed. - #: [Deprecated] - cudaErrorMixedDeviceExecution = cyruntime.cudaError.cudaErrorMixedDeviceExecution{{endif}} + cudaErrorMixedDeviceExecution = ( + cyruntime.cudaError.cudaErrorMixedDeviceExecution, + 'Mixing of device and device emulation code was not allowed. [Deprecated]\n' + ){{endif}} {{if 'cudaErrorNotYetImplemented' in found_values}} - #: This indicates that the API call is not yet implemented. Production - #: releases of CUDA will never return this error. [Deprecated] - cudaErrorNotYetImplemented = cyruntime.cudaError.cudaErrorNotYetImplemented{{endif}} + cudaErrorNotYetImplemented = ( + cyruntime.cudaError.cudaErrorNotYetImplemented, + 'This indicates that the API call is not yet implemented. Production\n' + 'releases of CUDA will never return this error. [Deprecated]\n' + ){{endif}} {{if 'cudaErrorMemoryValueTooLarge' in found_values}} - #: This indicated that an emulated device pointer exceeded the 32-bit - #: address range. [Deprecated] - cudaErrorMemoryValueTooLarge = cyruntime.cudaError.cudaErrorMemoryValueTooLarge{{endif}} + cudaErrorMemoryValueTooLarge = ( + cyruntime.cudaError.cudaErrorMemoryValueTooLarge, + 'This indicated that an emulated device pointer exceeded the 32-bit address\n' + 'range. [Deprecated]\n' + ){{endif}} {{if 'cudaErrorStubLibrary' in found_values}} - #: This indicates that the CUDA driver that the application has loaded - #: is a stub library. Applications that run with the stub rather than a - #: real driver loaded will result in CUDA API returning this error. - cudaErrorStubLibrary = cyruntime.cudaError.cudaErrorStubLibrary{{endif}} + cudaErrorStubLibrary = ( + cyruntime.cudaError.cudaErrorStubLibrary, + 'This indicates that the CUDA driver that the application has loaded is a\n' + 'stub library. Applications that run with the stub rather than a real driver\n' + 'loaded will result in CUDA API returning this error.\n' + ){{endif}} {{if 'cudaErrorInsufficientDriver' in found_values}} - #: This indicates that the installed NVIDIA CUDA driver is older than - #: the CUDA runtime library. This is not a supported configuration. - #: Users should install an updated NVIDIA display driver to allow the - #: application to run. - cudaErrorInsufficientDriver = cyruntime.cudaError.cudaErrorInsufficientDriver{{endif}} + cudaErrorInsufficientDriver = ( + cyruntime.cudaError.cudaErrorInsufficientDriver, + 'This indicates that the installed NVIDIA CUDA driver is older than the CUDA\n' + 'runtime library. This is not a supported configuration. Users should\n' + 'install an updated NVIDIA display driver to allow the application to run.\n' + ){{endif}} {{if 'cudaErrorCallRequiresNewerDriver' in found_values}} - #: This indicates that the API call requires a newer CUDA driver than - #: the one currently installed. Users should install an updated NVIDIA - #: CUDA driver to allow the API call to succeed. - cudaErrorCallRequiresNewerDriver = cyruntime.cudaError.cudaErrorCallRequiresNewerDriver{{endif}} + cudaErrorCallRequiresNewerDriver = ( + cyruntime.cudaError.cudaErrorCallRequiresNewerDriver, + 'This indicates that the API call requires a newer CUDA driver than the one\n' + 'currently installed. Users should install an updated NVIDIA CUDA driver to\n' + 'allow the API call to succeed.\n' + ){{endif}} {{if 'cudaErrorInvalidSurface' in found_values}} - #: This indicates that the surface passed to the API call is not a - #: valid surface. - cudaErrorInvalidSurface = cyruntime.cudaError.cudaErrorInvalidSurface{{endif}} + cudaErrorInvalidSurface = ( + cyruntime.cudaError.cudaErrorInvalidSurface, + 'This indicates that the surface passed to the API call is not a valid\n' + 'surface.\n' + ){{endif}} {{if 'cudaErrorDuplicateVariableName' in found_values}} - #: This indicates that multiple global or constant variables (across - #: separate CUDA source files in the application) share the same string - #: name. - cudaErrorDuplicateVariableName = cyruntime.cudaError.cudaErrorDuplicateVariableName{{endif}} + cudaErrorDuplicateVariableName = ( + cyruntime.cudaError.cudaErrorDuplicateVariableName, + 'This indicates that multiple global or constant variables (across separate\n' + 'CUDA source files in the application) share the same string name.\n' + ){{endif}} {{if 'cudaErrorDuplicateTextureName' in found_values}} - #: This indicates that multiple textures (across separate CUDA source - #: files in the application) share the same string name. - cudaErrorDuplicateTextureName = cyruntime.cudaError.cudaErrorDuplicateTextureName{{endif}} + cudaErrorDuplicateTextureName = ( + cyruntime.cudaError.cudaErrorDuplicateTextureName, + 'This indicates that multiple textures (across separate CUDA source files in\n' + 'the application) share the same string name.\n' + ){{endif}} {{if 'cudaErrorDuplicateSurfaceName' in found_values}} - #: This indicates that multiple surfaces (across separate CUDA source - #: files in the application) share the same string name. - cudaErrorDuplicateSurfaceName = cyruntime.cudaError.cudaErrorDuplicateSurfaceName{{endif}} + cudaErrorDuplicateSurfaceName = ( + cyruntime.cudaError.cudaErrorDuplicateSurfaceName, + 'This indicates that multiple surfaces (across separate CUDA source files in\n' + 'the application) share the same string name.\n' + ){{endif}} {{if 'cudaErrorDevicesUnavailable' in found_values}} - #: This indicates that all CUDA devices are busy or unavailable at the - #: current time. Devices are often busy/unavailable due to use of - #: :py:obj:`~.cudaComputeModeProhibited`, - #: :py:obj:`~.cudaComputeModeExclusiveProcess`, or when long running - #: CUDA kernels have filled up the GPU and are blocking new work from - #: starting. They can also be unavailable due to memory constraints on - #: a device that already has active CUDA work being performed. - cudaErrorDevicesUnavailable = cyruntime.cudaError.cudaErrorDevicesUnavailable{{endif}} + cudaErrorDevicesUnavailable = ( + cyruntime.cudaError.cudaErrorDevicesUnavailable, + 'This indicates that all CUDA devices are busy or unavailable at the current\n' + 'time. Devices are often busy/unavailable due to use of\n' + ':py:obj:`~.cudaComputeModeProhibited`,\n' + ':py:obj:`~.cudaComputeModeExclusiveProcess`, or when long running CUDA\n' + 'kernels have filled up the GPU and are blocking new work from starting.\n' + 'They can also be unavailable due to memory constraints on a device that\n' + 'already has active CUDA work being performed.\n' + ){{endif}} {{if 'cudaErrorIncompatibleDriverContext' in found_values}} - #: This indicates that the current context is not compatible with this - #: the CUDA Runtime. This can only occur if you are using CUDA - #: Runtime/Driver interoperability and have created an existing Driver - #: context using the driver API. The Driver context may be incompatible - #: either because the Driver context was created using an older version - #: of the API, because the Runtime API call expects a primary driver - #: context and the Driver context is not primary, or because the Driver - #: context has been destroyed. Please see :py:obj:`~.Interactions`with - #: the CUDA Driver API" for more information. - cudaErrorIncompatibleDriverContext = cyruntime.cudaError.cudaErrorIncompatibleDriverContext{{endif}} + cudaErrorIncompatibleDriverContext = ( + cyruntime.cudaError.cudaErrorIncompatibleDriverContext, + 'This indicates that the current context is not compatible with this the\n' + 'CUDA Runtime. This can only occur if you are using CUDA Runtime/Driver\n' + 'interoperability and have created an existing Driver context using the\n' + 'driver API. The Driver context may be incompatible either because the\n' + 'Driver context was created using an older version of the API, because the\n' + 'Runtime API call expects a primary driver context and the Driver context is\n' + 'not primary, or because the Driver context has been destroyed. Please see\n' + ':py:obj:`~.Interactions`with the CUDA Driver API" for more information.\n' + ){{endif}} {{if 'cudaErrorMissingConfiguration' in found_values}} - #: The device function being invoked (usually via - #: :py:obj:`~.cudaLaunchKernel()`) was not previously configured via - #: the :py:obj:`~.cudaConfigureCall()` function. - cudaErrorMissingConfiguration = cyruntime.cudaError.cudaErrorMissingConfiguration{{endif}} + cudaErrorMissingConfiguration = ( + cyruntime.cudaError.cudaErrorMissingConfiguration, + 'The device function being invoked (usually via\n' + ':py:obj:`~.cudaLaunchKernel()`) was not previously configured via the\n' + ':py:obj:`~.cudaConfigureCall()` function.\n' + ){{endif}} {{if 'cudaErrorPriorLaunchFailure' in found_values}} - #: This indicated that a previous kernel launch failed. This was - #: previously used for device emulation of kernel launches. - #: [Deprecated] - cudaErrorPriorLaunchFailure = cyruntime.cudaError.cudaErrorPriorLaunchFailure{{endif}} + cudaErrorPriorLaunchFailure = ( + cyruntime.cudaError.cudaErrorPriorLaunchFailure, + 'This indicated that a previous kernel launch failed. This was previously\n' + 'used for device emulation of kernel launches. [Deprecated]\n' + ){{endif}} {{if 'cudaErrorLaunchMaxDepthExceeded' in found_values}} - #: This error indicates that a device runtime grid launch did not occur - #: because the depth of the child grid would exceed the maximum - #: supported number of nested grid launches. - cudaErrorLaunchMaxDepthExceeded = cyruntime.cudaError.cudaErrorLaunchMaxDepthExceeded{{endif}} + cudaErrorLaunchMaxDepthExceeded = ( + cyruntime.cudaError.cudaErrorLaunchMaxDepthExceeded, + 'This error indicates that a device runtime grid launch did not occur\n' + 'because the depth of the child grid would exceed the maximum supported\n' + 'number of nested grid launches.\n' + ){{endif}} {{if 'cudaErrorLaunchFileScopedTex' in found_values}} - #: This error indicates that a grid launch did not occur because the - #: kernel uses file-scoped textures which are unsupported by the device - #: runtime. Kernels launched via the device runtime only support - #: textures created with the Texture Object API's. - cudaErrorLaunchFileScopedTex = cyruntime.cudaError.cudaErrorLaunchFileScopedTex{{endif}} + cudaErrorLaunchFileScopedTex = ( + cyruntime.cudaError.cudaErrorLaunchFileScopedTex, + 'This error indicates that a grid launch did not occur because the kernel\n' + 'uses file-scoped textures which are unsupported by the device runtime.\n' + 'Kernels launched via the device runtime only support textures created with\n' + "the Texture Object API's.\n" + ){{endif}} {{if 'cudaErrorLaunchFileScopedSurf' in found_values}} - #: This error indicates that a grid launch did not occur because the - #: kernel uses file-scoped surfaces which are unsupported by the device - #: runtime. Kernels launched via the device runtime only support - #: surfaces created with the Surface Object API's. - cudaErrorLaunchFileScopedSurf = cyruntime.cudaError.cudaErrorLaunchFileScopedSurf{{endif}} + cudaErrorLaunchFileScopedSurf = ( + cyruntime.cudaError.cudaErrorLaunchFileScopedSurf, + 'This error indicates that a grid launch did not occur because the kernel\n' + 'uses file-scoped surfaces which are unsupported by the device runtime.\n' + 'Kernels launched via the device runtime only support surfaces created with\n' + "the Surface Object API's.\n" + ){{endif}} {{if 'cudaErrorSyncDepthExceeded' in found_values}} - #: This error indicates that a call to - #: :py:obj:`~.cudaDeviceSynchronize` made from the device runtime - #: failed because the call was made at grid depth greater than than - #: either the default (2 levels of grids) or user specified device - #: limit :py:obj:`~.cudaLimitDevRuntimeSyncDepth`. To be able to - #: synchronize on launched grids at a greater depth successfully, the - #: maximum nested depth at which :py:obj:`~.cudaDeviceSynchronize` will - #: be called must be specified with the - #: :py:obj:`~.cudaLimitDevRuntimeSyncDepth` limit to the - #: :py:obj:`~.cudaDeviceSetLimit` api before the host-side launch of a - #: kernel using the device runtime. Keep in mind that additional levels - #: of sync depth require the runtime to reserve large amounts of device - #: memory that cannot be used for user allocations. Note that - #: :py:obj:`~.cudaDeviceSynchronize` made from device runtime is only - #: supported on devices of compute capability < 9.0. - cudaErrorSyncDepthExceeded = cyruntime.cudaError.cudaErrorSyncDepthExceeded{{endif}} + cudaErrorSyncDepthExceeded = ( + cyruntime.cudaError.cudaErrorSyncDepthExceeded, + 'This error indicates that a call to :py:obj:`~.cudaDeviceSynchronize` made\n' + 'from the device runtime failed because the call was made at grid depth\n' + 'greater than than either the default (2 levels of grids) or user specified\n' + 'device limit :py:obj:`~.cudaLimitDevRuntimeSyncDepth`. To be able to\n' + 'synchronize on launched grids at a greater depth successfully, the maximum\n' + 'nested depth at which :py:obj:`~.cudaDeviceSynchronize` will be called must\n' + 'be specified with the :py:obj:`~.cudaLimitDevRuntimeSyncDepth` limit to the\n' + ':py:obj:`~.cudaDeviceSetLimit` api before the host-side launch of a kernel\n' + 'using the device runtime. Keep in mind that additional levels of sync depth\n' + 'require the runtime to reserve large amounts of device memory that cannot\n' + 'be used for user allocations. Note that :py:obj:`~.cudaDeviceSynchronize`\n' + 'made from device runtime is only supported on devices of compute capability\n' + '< 9.0.\n' + ){{endif}} {{if 'cudaErrorLaunchPendingCountExceeded' in found_values}} - #: This error indicates that a device runtime grid launch failed - #: because the launch would exceed the limit - #: :py:obj:`~.cudaLimitDevRuntimePendingLaunchCount`. For this launch - #: to proceed successfully, :py:obj:`~.cudaDeviceSetLimit` must be - #: called to set the :py:obj:`~.cudaLimitDevRuntimePendingLaunchCount` - #: to be higher than the upper bound of outstanding launches that can - #: be issued to the device runtime. Keep in mind that raising the limit - #: of pending device runtime launches will require the runtime to - #: reserve device memory that cannot be used for user allocations. - cudaErrorLaunchPendingCountExceeded = cyruntime.cudaError.cudaErrorLaunchPendingCountExceeded{{endif}} + cudaErrorLaunchPendingCountExceeded = ( + cyruntime.cudaError.cudaErrorLaunchPendingCountExceeded, + 'This error indicates that a device runtime grid launch failed because the\n' + 'launch would exceed the limit\n' + ':py:obj:`~.cudaLimitDevRuntimePendingLaunchCount`. For this launch to\n' + 'proceed successfully, :py:obj:`~.cudaDeviceSetLimit` must be called to set\n' + 'the :py:obj:`~.cudaLimitDevRuntimePendingLaunchCount` to be higher than the\n' + 'upper bound of outstanding launches that can be issued to the device\n' + 'runtime. Keep in mind that raising the limit of pending device runtime\n' + 'launches will require the runtime to reserve device memory that cannot be\n' + 'used for user allocations.\n' + ){{endif}} {{if 'cudaErrorInvalidDeviceFunction' in found_values}} - #: The requested device function does not exist or is not compiled for - #: the proper device architecture. - cudaErrorInvalidDeviceFunction = cyruntime.cudaError.cudaErrorInvalidDeviceFunction{{endif}} + cudaErrorInvalidDeviceFunction = ( + cyruntime.cudaError.cudaErrorInvalidDeviceFunction, + 'The requested device function does not exist or is not compiled for the\n' + 'proper device architecture.\n' + ){{endif}} {{if 'cudaErrorNoDevice' in found_values}} - #: This indicates that no CUDA-capable devices were detected by the - #: installed CUDA driver. - cudaErrorNoDevice = cyruntime.cudaError.cudaErrorNoDevice{{endif}} + cudaErrorNoDevice = ( + cyruntime.cudaError.cudaErrorNoDevice, + 'This indicates that no CUDA-capable devices were detected by the installed\n' + 'CUDA driver.\n' + ){{endif}} {{if 'cudaErrorInvalidDevice' in found_values}} - #: This indicates that the device ordinal supplied by the user does not - #: correspond to a valid CUDA device or that the action requested is - #: invalid for the specified device. - cudaErrorInvalidDevice = cyruntime.cudaError.cudaErrorInvalidDevice{{endif}} + cudaErrorInvalidDevice = ( + cyruntime.cudaError.cudaErrorInvalidDevice, + 'This indicates that the device ordinal supplied by the user does not\n' + 'correspond to a valid CUDA device or that the action requested is invalid\n' + 'for the specified device.\n' + ){{endif}} {{if 'cudaErrorDeviceNotLicensed' in found_values}} - #: This indicates that the device doesn't have a valid Grid License. - cudaErrorDeviceNotLicensed = cyruntime.cudaError.cudaErrorDeviceNotLicensed{{endif}} + cudaErrorDeviceNotLicensed = ( + cyruntime.cudaError.cudaErrorDeviceNotLicensed, + "This indicates that the device doesn't have a valid Grid License.\n" + ){{endif}} {{if 'cudaErrorSoftwareValidityNotEstablished' in found_values}} - #: By default, the CUDA runtime may perform a minimal set of self- - #: tests, as well as CUDA driver tests, to establish the validity of - #: both. Introduced in CUDA 11.2, this error return indicates that at - #: least one of these tests has failed and the validity of either the - #: runtime or the driver could not be established. - cudaErrorSoftwareValidityNotEstablished = cyruntime.cudaError.cudaErrorSoftwareValidityNotEstablished{{endif}} + cudaErrorSoftwareValidityNotEstablished = ( + cyruntime.cudaError.cudaErrorSoftwareValidityNotEstablished, + 'By default, the CUDA runtime may perform a minimal set of self-tests, as\n' + 'well as CUDA driver tests, to establish the validity of both. Introduced in\n' + 'CUDA 11.2, this error return indicates that at least one of these tests has\n' + 'failed and the validity of either the runtime or the driver could not be\n' + 'established.\n' + ){{endif}} {{if 'cudaErrorStartupFailure' in found_values}} - #: This indicates an internal startup failure in the CUDA runtime. - cudaErrorStartupFailure = cyruntime.cudaError.cudaErrorStartupFailure{{endif}} + cudaErrorStartupFailure = ( + cyruntime.cudaError.cudaErrorStartupFailure, + 'This indicates an internal startup failure in the CUDA runtime.\n' + ){{endif}} {{if 'cudaErrorInvalidKernelImage' in found_values}} - #: This indicates that the device kernel image is invalid. - cudaErrorInvalidKernelImage = cyruntime.cudaError.cudaErrorInvalidKernelImage{{endif}} + cudaErrorInvalidKernelImage = ( + cyruntime.cudaError.cudaErrorInvalidKernelImage, + 'This indicates that the device kernel image is invalid.\n' + ){{endif}} {{if 'cudaErrorDeviceUninitialized' in found_values}} - #: This most frequently indicates that there is no context bound to the - #: current thread. This can also be returned if the context passed to - #: an API call is not a valid handle (such as a context that has had - #: :py:obj:`~.cuCtxDestroy()` invoked on it). This can also be returned - #: if a user mixes different API versions (i.e. 3010 context with 3020 - #: API calls). See :py:obj:`~.cuCtxGetApiVersion()` for more details. - cudaErrorDeviceUninitialized = cyruntime.cudaError.cudaErrorDeviceUninitialized{{endif}} + cudaErrorDeviceUninitialized = ( + cyruntime.cudaError.cudaErrorDeviceUninitialized, + 'This most frequently indicates that there is no context bound to the\n' + 'current thread. This can also be returned if the context passed to an API\n' + 'call is not a valid handle (such as a context that has had\n' + ':py:obj:`~.cuCtxDestroy()` invoked on it). This can also be returned if a\n' + 'user mixes different API versions (i.e. 3010 context with 3020 API calls).\n' + 'See :py:obj:`~.cuCtxGetApiVersion()` for more details.\n' + ){{endif}} {{if 'cudaErrorMapBufferObjectFailed' in found_values}} - #: This indicates that the buffer object could not be mapped. - cudaErrorMapBufferObjectFailed = cyruntime.cudaError.cudaErrorMapBufferObjectFailed{{endif}} + cudaErrorMapBufferObjectFailed = ( + cyruntime.cudaError.cudaErrorMapBufferObjectFailed, + 'This indicates that the buffer object could not be mapped.\n' + ){{endif}} {{if 'cudaErrorUnmapBufferObjectFailed' in found_values}} - #: This indicates that the buffer object could not be unmapped. - cudaErrorUnmapBufferObjectFailed = cyruntime.cudaError.cudaErrorUnmapBufferObjectFailed{{endif}} + cudaErrorUnmapBufferObjectFailed = ( + cyruntime.cudaError.cudaErrorUnmapBufferObjectFailed, + 'This indicates that the buffer object could not be unmapped.\n' + ){{endif}} {{if 'cudaErrorArrayIsMapped' in found_values}} - #: This indicates that the specified array is currently mapped and thus - #: cannot be destroyed. - cudaErrorArrayIsMapped = cyruntime.cudaError.cudaErrorArrayIsMapped{{endif}} + cudaErrorArrayIsMapped = ( + cyruntime.cudaError.cudaErrorArrayIsMapped, + 'This indicates that the specified array is currently mapped and thus cannot\n' + 'be destroyed.\n' + ){{endif}} {{if 'cudaErrorAlreadyMapped' in found_values}} - #: This indicates that the resource is already mapped. - cudaErrorAlreadyMapped = cyruntime.cudaError.cudaErrorAlreadyMapped{{endif}} + cudaErrorAlreadyMapped = ( + cyruntime.cudaError.cudaErrorAlreadyMapped, + 'This indicates that the resource is already mapped.\n' + ){{endif}} {{if 'cudaErrorNoKernelImageForDevice' in found_values}} - #: This indicates that there is no kernel image available that is - #: suitable for the device. This can occur when a user specifies code - #: generation options for a particular CUDA source file that do not - #: include the corresponding device configuration. - cudaErrorNoKernelImageForDevice = cyruntime.cudaError.cudaErrorNoKernelImageForDevice{{endif}} + cudaErrorNoKernelImageForDevice = ( + cyruntime.cudaError.cudaErrorNoKernelImageForDevice, + 'This indicates that there is no kernel image available that is suitable for\n' + 'the device. This can occur when a user specifies code generation options\n' + 'for a particular CUDA source file that do not include the corresponding\n' + 'device configuration.\n' + ){{endif}} {{if 'cudaErrorAlreadyAcquired' in found_values}} - #: This indicates that a resource has already been acquired. - cudaErrorAlreadyAcquired = cyruntime.cudaError.cudaErrorAlreadyAcquired{{endif}} + cudaErrorAlreadyAcquired = ( + cyruntime.cudaError.cudaErrorAlreadyAcquired, + 'This indicates that a resource has already been acquired.\n' + ){{endif}} {{if 'cudaErrorNotMapped' in found_values}} - #: This indicates that a resource is not mapped. - cudaErrorNotMapped = cyruntime.cudaError.cudaErrorNotMapped{{endif}} + cudaErrorNotMapped = ( + cyruntime.cudaError.cudaErrorNotMapped, + 'This indicates that a resource is not mapped.\n' + ){{endif}} {{if 'cudaErrorNotMappedAsArray' in found_values}} - #: This indicates that a mapped resource is not available for access as - #: an array. - cudaErrorNotMappedAsArray = cyruntime.cudaError.cudaErrorNotMappedAsArray{{endif}} + cudaErrorNotMappedAsArray = ( + cyruntime.cudaError.cudaErrorNotMappedAsArray, + 'This indicates that a mapped resource is not available for access as an\n' + 'array.\n' + ){{endif}} {{if 'cudaErrorNotMappedAsPointer' in found_values}} - #: This indicates that a mapped resource is not available for access as - #: a pointer. - cudaErrorNotMappedAsPointer = cyruntime.cudaError.cudaErrorNotMappedAsPointer{{endif}} + cudaErrorNotMappedAsPointer = ( + cyruntime.cudaError.cudaErrorNotMappedAsPointer, + 'This indicates that a mapped resource is not available for access as a\n' + 'pointer.\n' + ){{endif}} {{if 'cudaErrorECCUncorrectable' in found_values}} - #: This indicates that an uncorrectable ECC error was detected during - #: execution. - cudaErrorECCUncorrectable = cyruntime.cudaError.cudaErrorECCUncorrectable{{endif}} + cudaErrorECCUncorrectable = ( + cyruntime.cudaError.cudaErrorECCUncorrectable, + 'This indicates that an uncorrectable ECC error was detected during\n' + 'execution.\n' + ){{endif}} {{if 'cudaErrorUnsupportedLimit' in found_values}} - #: This indicates that the :py:obj:`~.cudaLimit` passed to the API call - #: is not supported by the active device. - cudaErrorUnsupportedLimit = cyruntime.cudaError.cudaErrorUnsupportedLimit{{endif}} + cudaErrorUnsupportedLimit = ( + cyruntime.cudaError.cudaErrorUnsupportedLimit, + 'This indicates that the :py:obj:`~.cudaLimit` passed to the API call is not\n' + 'supported by the active device.\n' + ){{endif}} {{if 'cudaErrorDeviceAlreadyInUse' in found_values}} - #: This indicates that a call tried to access an exclusive-thread - #: device that is already in use by a different thread. - cudaErrorDeviceAlreadyInUse = cyruntime.cudaError.cudaErrorDeviceAlreadyInUse{{endif}} + cudaErrorDeviceAlreadyInUse = ( + cyruntime.cudaError.cudaErrorDeviceAlreadyInUse, + 'This indicates that a call tried to access an exclusive-thread device that\n' + 'is already in use by a different thread.\n' + ){{endif}} {{if 'cudaErrorPeerAccessUnsupported' in found_values}} - #: This error indicates that P2P access is not supported across the - #: given devices. - cudaErrorPeerAccessUnsupported = cyruntime.cudaError.cudaErrorPeerAccessUnsupported{{endif}} + cudaErrorPeerAccessUnsupported = ( + cyruntime.cudaError.cudaErrorPeerAccessUnsupported, + 'This error indicates that P2P access is not supported across the given\n' + 'devices.\n' + ){{endif}} {{if 'cudaErrorInvalidPtx' in found_values}} - #: A PTX compilation failed. The runtime may fall back to compiling PTX - #: if an application does not contain a suitable binary for the current - #: device. - cudaErrorInvalidPtx = cyruntime.cudaError.cudaErrorInvalidPtx{{endif}} + cudaErrorInvalidPtx = ( + cyruntime.cudaError.cudaErrorInvalidPtx, + 'A PTX compilation failed. The runtime may fall back to compiling PTX if an\n' + 'application does not contain a suitable binary for the current device.\n' + ){{endif}} {{if 'cudaErrorInvalidGraphicsContext' in found_values}} - #: This indicates an error with the OpenGL or DirectX context. - cudaErrorInvalidGraphicsContext = cyruntime.cudaError.cudaErrorInvalidGraphicsContext{{endif}} + cudaErrorInvalidGraphicsContext = ( + cyruntime.cudaError.cudaErrorInvalidGraphicsContext, + 'This indicates an error with the OpenGL or DirectX context.\n' + ){{endif}} {{if 'cudaErrorNvlinkUncorrectable' in found_values}} - #: This indicates that an uncorrectable NVLink error was detected - #: during the execution. - cudaErrorNvlinkUncorrectable = cyruntime.cudaError.cudaErrorNvlinkUncorrectable{{endif}} + cudaErrorNvlinkUncorrectable = ( + cyruntime.cudaError.cudaErrorNvlinkUncorrectable, + 'This indicates that an uncorrectable NVLink error was detected during the\n' + 'execution.\n' + ){{endif}} {{if 'cudaErrorJitCompilerNotFound' in found_values}} - #: This indicates that the PTX JIT compiler library was not found. The - #: JIT Compiler library is used for PTX compilation. The runtime may - #: fall back to compiling PTX if an application does not contain a - #: suitable binary for the current device. - cudaErrorJitCompilerNotFound = cyruntime.cudaError.cudaErrorJitCompilerNotFound{{endif}} + cudaErrorJitCompilerNotFound = ( + cyruntime.cudaError.cudaErrorJitCompilerNotFound, + 'This indicates that the PTX JIT compiler library was not found. The JIT\n' + 'Compiler library is used for PTX compilation. The runtime may fall back to\n' + 'compiling PTX if an application does not contain a suitable binary for the\n' + 'current device.\n' + ){{endif}} {{if 'cudaErrorUnsupportedPtxVersion' in found_values}} - #: This indicates that the provided PTX was compiled with an - #: unsupported toolchain. The most common reason for this, is the PTX - #: was generated by a compiler newer than what is supported by the CUDA - #: driver and PTX JIT compiler. - cudaErrorUnsupportedPtxVersion = cyruntime.cudaError.cudaErrorUnsupportedPtxVersion{{endif}} + cudaErrorUnsupportedPtxVersion = ( + cyruntime.cudaError.cudaErrorUnsupportedPtxVersion, + 'This indicates that the provided PTX was compiled with an unsupported\n' + 'toolchain. The most common reason for this, is the PTX was generated by a\n' + 'compiler newer than what is supported by the CUDA driver and PTX JIT\n' + 'compiler.\n' + ){{endif}} {{if 'cudaErrorJitCompilationDisabled' in found_values}} - #: This indicates that the JIT compilation was disabled. The JIT - #: compilation compiles PTX. The runtime may fall back to compiling PTX - #: if an application does not contain a suitable binary for the current - #: device. - cudaErrorJitCompilationDisabled = cyruntime.cudaError.cudaErrorJitCompilationDisabled{{endif}} + cudaErrorJitCompilationDisabled = ( + cyruntime.cudaError.cudaErrorJitCompilationDisabled, + 'This indicates that the JIT compilation was disabled. The JIT compilation\n' + 'compiles PTX. The runtime may fall back to compiling PTX if an application\n' + 'does not contain a suitable binary for the current device.\n' + ){{endif}} {{if 'cudaErrorUnsupportedExecAffinity' in found_values}} - #: This indicates that the provided execution affinity is not supported - #: by the device. - cudaErrorUnsupportedExecAffinity = cyruntime.cudaError.cudaErrorUnsupportedExecAffinity{{endif}} + cudaErrorUnsupportedExecAffinity = ( + cyruntime.cudaError.cudaErrorUnsupportedExecAffinity, + 'This indicates that the provided execution affinity is not supported by the\n' + 'device.\n' + ){{endif}} {{if 'cudaErrorUnsupportedDevSideSync' in found_values}} - #: This indicates that the code to be compiled by the PTX JIT contains - #: unsupported call to cudaDeviceSynchronize. - cudaErrorUnsupportedDevSideSync = cyruntime.cudaError.cudaErrorUnsupportedDevSideSync{{endif}} + cudaErrorUnsupportedDevSideSync = ( + cyruntime.cudaError.cudaErrorUnsupportedDevSideSync, + 'This indicates that the code to be compiled by the PTX JIT contains\n' + 'unsupported call to cudaDeviceSynchronize.\n' + ){{endif}} {{if 'cudaErrorContained' in found_values}} - #: This indicates that an exception occurred on the device that is now - #: contained by the GPU's error containment capability. Common causes - #: are - a. Certain types of invalid accesses of peer GPU memory over - #: nvlink b. Certain classes of hardware errors This leaves the process - #: in an inconsistent state and any further CUDA work will return the - #: same error. To continue using CUDA, the process must be terminated - #: and relaunched. - cudaErrorContained = cyruntime.cudaError.cudaErrorContained{{endif}} + cudaErrorContained = ( + cyruntime.cudaError.cudaErrorContained, + 'This indicates that an exception occurred on the device that is now\n' + "contained by the GPU's error containment capability. Common causes are - a.\n" + 'Certain types of invalid accesses of peer GPU memory over nvlink b. Certain\n' + 'classes of hardware errors This leaves the process in an inconsistent state\n' + 'and any further CUDA work will return the same error. To continue using\n' + 'CUDA, the process must be terminated and relaunched.\n' + ){{endif}} {{if 'cudaErrorInvalidSource' in found_values}} - #: This indicates that the device kernel source is invalid. - cudaErrorInvalidSource = cyruntime.cudaError.cudaErrorInvalidSource{{endif}} + cudaErrorInvalidSource = ( + cyruntime.cudaError.cudaErrorInvalidSource, + 'This indicates that the device kernel source is invalid.\n' + ){{endif}} {{if 'cudaErrorFileNotFound' in found_values}} - #: This indicates that the file specified was not found. - cudaErrorFileNotFound = cyruntime.cudaError.cudaErrorFileNotFound{{endif}} + cudaErrorFileNotFound = ( + cyruntime.cudaError.cudaErrorFileNotFound, + 'This indicates that the file specified was not found.\n' + ){{endif}} {{if 'cudaErrorSharedObjectSymbolNotFound' in found_values}} - #: This indicates that a link to a shared object failed to resolve. - cudaErrorSharedObjectSymbolNotFound = cyruntime.cudaError.cudaErrorSharedObjectSymbolNotFound{{endif}} + cudaErrorSharedObjectSymbolNotFound = ( + cyruntime.cudaError.cudaErrorSharedObjectSymbolNotFound, + 'This indicates that a link to a shared object failed to resolve.\n' + ){{endif}} {{if 'cudaErrorSharedObjectInitFailed' in found_values}} - #: This indicates that initialization of a shared object failed. - cudaErrorSharedObjectInitFailed = cyruntime.cudaError.cudaErrorSharedObjectInitFailed{{endif}} + cudaErrorSharedObjectInitFailed = ( + cyruntime.cudaError.cudaErrorSharedObjectInitFailed, + 'This indicates that initialization of a shared object failed.\n' + ){{endif}} {{if 'cudaErrorOperatingSystem' in found_values}} - #: This error indicates that an OS call failed. - cudaErrorOperatingSystem = cyruntime.cudaError.cudaErrorOperatingSystem{{endif}} + cudaErrorOperatingSystem = ( + cyruntime.cudaError.cudaErrorOperatingSystem, + 'This error indicates that an OS call failed.\n' + ){{endif}} {{if 'cudaErrorInvalidResourceHandle' in found_values}} - #: This indicates that a resource handle passed to the API call was not - #: valid. Resource handles are opaque types like - #: :py:obj:`~.cudaStream_t` and :py:obj:`~.cudaEvent_t`. - cudaErrorInvalidResourceHandle = cyruntime.cudaError.cudaErrorInvalidResourceHandle{{endif}} + cudaErrorInvalidResourceHandle = ( + cyruntime.cudaError.cudaErrorInvalidResourceHandle, + 'This indicates that a resource handle passed to the API call was not valid.\n' + 'Resource handles are opaque types like :py:obj:`~.cudaStream_t` and\n' + ':py:obj:`~.cudaEvent_t`.\n' + ){{endif}} {{if 'cudaErrorIllegalState' in found_values}} - #: This indicates that a resource required by the API call is not in a - #: valid state to perform the requested operation. - cudaErrorIllegalState = cyruntime.cudaError.cudaErrorIllegalState{{endif}} + cudaErrorIllegalState = ( + cyruntime.cudaError.cudaErrorIllegalState, + 'This indicates that a resource required by the API call is not in a valid\n' + 'state to perform the requested operation.\n' + ){{endif}} {{if 'cudaErrorLossyQuery' in found_values}} - #: This indicates an attempt was made to introspect an object in a way - #: that would discard semantically important information. This is - #: either due to the object using funtionality newer than the API - #: version used to introspect it or omission of optional return - #: arguments. - cudaErrorLossyQuery = cyruntime.cudaError.cudaErrorLossyQuery{{endif}} + cudaErrorLossyQuery = ( + cyruntime.cudaError.cudaErrorLossyQuery, + 'This indicates an attempt was made to introspect an object in a way that\n' + 'would discard semantically important information. This is either due to the\n' + 'object using funtionality newer than the API version used to introspect it\n' + 'or omission of optional return arguments.\n' + ){{endif}} {{if 'cudaErrorSymbolNotFound' in found_values}} - #: This indicates that a named symbol was not found. Examples of - #: symbols are global/constant variable names, driver function names, - #: texture names, and surface names. - cudaErrorSymbolNotFound = cyruntime.cudaError.cudaErrorSymbolNotFound{{endif}} + cudaErrorSymbolNotFound = ( + cyruntime.cudaError.cudaErrorSymbolNotFound, + 'This indicates that a named symbol was not found. Examples of symbols are\n' + 'global/constant variable names, driver function names, texture names, and\n' + 'surface names.\n' + ){{endif}} {{if 'cudaErrorNotReady' in found_values}} - #: This indicates that asynchronous operations issued previously have - #: not completed yet. This result is not actually an error, but must be - #: indicated differently than :py:obj:`~.cudaSuccess` (which indicates - #: completion). Calls that may return this value include - #: :py:obj:`~.cudaEventQuery()` and :py:obj:`~.cudaStreamQuery()`. - cudaErrorNotReady = cyruntime.cudaError.cudaErrorNotReady{{endif}} + cudaErrorNotReady = ( + cyruntime.cudaError.cudaErrorNotReady, + 'This indicates that asynchronous operations issued previously have not\n' + 'completed yet. This result is not actually an error, but must be indicated\n' + 'differently than :py:obj:`~.cudaSuccess` (which indicates completion).\n' + 'Calls that may return this value include :py:obj:`~.cudaEventQuery()` and\n' + ':py:obj:`~.cudaStreamQuery()`.\n' + ){{endif}} {{if 'cudaErrorIllegalAddress' in found_values}} - #: The device encountered a load or store instruction on an invalid - #: memory address. This leaves the process in an inconsistent state and - #: any further CUDA work will return the same error. To continue using - #: CUDA, the process must be terminated and relaunched. - cudaErrorIllegalAddress = cyruntime.cudaError.cudaErrorIllegalAddress{{endif}} + cudaErrorIllegalAddress = ( + cyruntime.cudaError.cudaErrorIllegalAddress, + 'The device encountered a load or store instruction on an invalid memory\n' + 'address. This leaves the process in an inconsistent state and any further\n' + 'CUDA work will return the same error. To continue using CUDA, the process\n' + 'must be terminated and relaunched.\n' + ){{endif}} {{if 'cudaErrorLaunchOutOfResources' in found_values}} - #: This indicates that a launch did not occur because it did not have - #: appropriate resources. Although this error is similar to - #: :py:obj:`~.cudaErrorInvalidConfiguration`, this error usually - #: indicates that the user has attempted to pass too many arguments to - #: the device kernel, or the kernel launch specifies too many threads - #: for the kernel's register count. - cudaErrorLaunchOutOfResources = cyruntime.cudaError.cudaErrorLaunchOutOfResources{{endif}} + cudaErrorLaunchOutOfResources = ( + cyruntime.cudaError.cudaErrorLaunchOutOfResources, + 'This indicates that a launch did not occur because it did not have\n' + 'appropriate resources. Although this error is similar to\n' + ':py:obj:`~.cudaErrorInvalidConfiguration`, this error usually indicates\n' + 'that the user has attempted to pass too many arguments to the device\n' + "kernel, or the kernel launch specifies too many threads for the kernel's\n" + 'register count.\n' + ){{endif}} {{if 'cudaErrorLaunchTimeout' in found_values}} - #: This indicates that the device kernel took too long to execute. This - #: can only occur if timeouts are enabled - see the device attribute - #: :py:obj:`~.cudaDevAttrKernelExecTimeout` for more information. This - #: leaves the process in an inconsistent state and any further CUDA - #: work will return the same error. To continue using CUDA, the process - #: must be terminated and relaunched. - cudaErrorLaunchTimeout = cyruntime.cudaError.cudaErrorLaunchTimeout{{endif}} + cudaErrorLaunchTimeout = ( + cyruntime.cudaError.cudaErrorLaunchTimeout, + 'This indicates that the device kernel took too long to execute. This can\n' + 'only occur if timeouts are enabled - see the device attribute\n' + ':py:obj:`~.cudaDevAttrKernelExecTimeout` for more information. This leaves\n' + 'the process in an inconsistent state and any further CUDA work will return\n' + 'the same error. To continue using CUDA, the process must be terminated and\n' + 'relaunched.\n' + ){{endif}} {{if 'cudaErrorLaunchIncompatibleTexturing' in found_values}} - #: This error indicates a kernel launch that uses an incompatible - #: texturing mode. - cudaErrorLaunchIncompatibleTexturing = cyruntime.cudaError.cudaErrorLaunchIncompatibleTexturing{{endif}} + cudaErrorLaunchIncompatibleTexturing = ( + cyruntime.cudaError.cudaErrorLaunchIncompatibleTexturing, + 'This error indicates a kernel launch that uses an incompatible texturing\n' + 'mode.\n' + ){{endif}} {{if 'cudaErrorPeerAccessAlreadyEnabled' in found_values}} - #: This error indicates that a call to - #: :py:obj:`~.cudaDeviceEnablePeerAccess()` is trying to re-enable peer - #: addressing on from a context which has already had peer addressing - #: enabled. - cudaErrorPeerAccessAlreadyEnabled = cyruntime.cudaError.cudaErrorPeerAccessAlreadyEnabled{{endif}} + cudaErrorPeerAccessAlreadyEnabled = ( + cyruntime.cudaError.cudaErrorPeerAccessAlreadyEnabled, + 'This error indicates that a call to\n' + ':py:obj:`~.cudaDeviceEnablePeerAccess()` is trying to re-enable peer\n' + 'addressing on from a context which has already had peer addressing enabled.\n' + ){{endif}} {{if 'cudaErrorPeerAccessNotEnabled' in found_values}} - #: This error indicates that :py:obj:`~.cudaDeviceDisablePeerAccess()` - #: is trying to disable peer addressing which has not been enabled yet - #: via :py:obj:`~.cudaDeviceEnablePeerAccess()`. - cudaErrorPeerAccessNotEnabled = cyruntime.cudaError.cudaErrorPeerAccessNotEnabled{{endif}} + cudaErrorPeerAccessNotEnabled = ( + cyruntime.cudaError.cudaErrorPeerAccessNotEnabled, + 'This error indicates that :py:obj:`~.cudaDeviceDisablePeerAccess()` is\n' + 'trying to disable peer addressing which has not been enabled yet via\n' + ':py:obj:`~.cudaDeviceEnablePeerAccess()`.\n' + ){{endif}} {{if 'cudaErrorSetOnActiveProcess' in found_values}} - #: This indicates that the user has called - #: :py:obj:`~.cudaSetValidDevices()`, :py:obj:`~.cudaSetDeviceFlags()`, - #: :py:obj:`~.cudaD3D9SetDirect3DDevice()`, - #: :py:obj:`~.cudaD3D10SetDirect3DDevice`, - #: :py:obj:`~.cudaD3D11SetDirect3DDevice()`, or - #: :py:obj:`~.cudaVDPAUSetVDPAUDevice()` after initializing the CUDA - #: runtime by calling non-device management operations (allocating - #: memory and launching kernels are examples of non-device management - #: operations). This error can also be returned if using runtime/driver - #: interoperability and there is an existing :py:obj:`~.CUcontext` - #: active on the host thread. - cudaErrorSetOnActiveProcess = cyruntime.cudaError.cudaErrorSetOnActiveProcess{{endif}} + cudaErrorSetOnActiveProcess = ( + cyruntime.cudaError.cudaErrorSetOnActiveProcess, + 'This indicates that the user has called :py:obj:`~.cudaSetValidDevices()`,\n' + ':py:obj:`~.cudaSetDeviceFlags()`, :py:obj:`~.cudaD3D9SetDirect3DDevice()`,\n' + ':py:obj:`~.cudaD3D10SetDirect3DDevice`,\n' + ':py:obj:`~.cudaD3D11SetDirect3DDevice()`, or\n' + ':py:obj:`~.cudaVDPAUSetVDPAUDevice()` after initializing the CUDA runtime\n' + 'by calling non-device management operations (allocating memory and\n' + 'launching kernels are examples of non-device management operations). This\n' + 'error can also be returned if using runtime/driver interoperability and\n' + 'there is an existing :py:obj:`~.CUcontext` active on the host thread.\n' + ){{endif}} {{if 'cudaErrorContextIsDestroyed' in found_values}} - #: This error indicates that the context current to the calling thread - #: has been destroyed using :py:obj:`~.cuCtxDestroy`, or is a primary - #: context which has not yet been initialized. - cudaErrorContextIsDestroyed = cyruntime.cudaError.cudaErrorContextIsDestroyed{{endif}} + cudaErrorContextIsDestroyed = ( + cyruntime.cudaError.cudaErrorContextIsDestroyed, + 'This error indicates that the context current to the calling thread has\n' + 'been destroyed using :py:obj:`~.cuCtxDestroy`, or is a primary context\n' + 'which has not yet been initialized.\n' + ){{endif}} {{if 'cudaErrorAssert' in found_values}} - #: An assert triggered in device code during kernel execution. The - #: device cannot be used again. All existing allocations are invalid. - #: To continue using CUDA, the process must be terminated and - #: relaunched. - cudaErrorAssert = cyruntime.cudaError.cudaErrorAssert{{endif}} + cudaErrorAssert = ( + cyruntime.cudaError.cudaErrorAssert, + 'An assert triggered in device code during kernel execution. The device\n' + 'cannot be used again. All existing allocations are invalid. To continue\n' + 'using CUDA, the process must be terminated and relaunched.\n' + ){{endif}} {{if 'cudaErrorTooManyPeers' in found_values}} - #: This error indicates that the hardware resources required to enable - #: peer access have been exhausted for one or more of the devices - #: passed to :py:obj:`~.cudaEnablePeerAccess()`. - cudaErrorTooManyPeers = cyruntime.cudaError.cudaErrorTooManyPeers{{endif}} + cudaErrorTooManyPeers = ( + cyruntime.cudaError.cudaErrorTooManyPeers, + 'This error indicates that the hardware resources required to enable peer\n' + 'access have been exhausted for one or more of the devices passed to\n' + ':py:obj:`~.cudaEnablePeerAccess()`.\n' + ){{endif}} {{if 'cudaErrorHostMemoryAlreadyRegistered' in found_values}} - #: This error indicates that the memory range passed to - #: :py:obj:`~.cudaHostRegister()` has already been registered. - cudaErrorHostMemoryAlreadyRegistered = cyruntime.cudaError.cudaErrorHostMemoryAlreadyRegistered{{endif}} + cudaErrorHostMemoryAlreadyRegistered = ( + cyruntime.cudaError.cudaErrorHostMemoryAlreadyRegistered, + 'This error indicates that the memory range passed to\n' + ':py:obj:`~.cudaHostRegister()` has already been registered.\n' + ){{endif}} {{if 'cudaErrorHostMemoryNotRegistered' in found_values}} - #: This error indicates that the pointer passed to - #: :py:obj:`~.cudaHostUnregister()` does not correspond to any - #: currently registered memory region. - cudaErrorHostMemoryNotRegistered = cyruntime.cudaError.cudaErrorHostMemoryNotRegistered{{endif}} + cudaErrorHostMemoryNotRegistered = ( + cyruntime.cudaError.cudaErrorHostMemoryNotRegistered, + 'This error indicates that the pointer passed to\n' + ':py:obj:`~.cudaHostUnregister()` does not correspond to any currently\n' + 'registered memory region.\n' + ){{endif}} {{if 'cudaErrorHardwareStackError' in found_values}} - #: Device encountered an error in the call stack during kernel - #: execution, possibly due to stack corruption or exceeding the stack - #: size limit. This leaves the process in an inconsistent state and any - #: further CUDA work will return the same error. To continue using - #: CUDA, the process must be terminated and relaunched. - cudaErrorHardwareStackError = cyruntime.cudaError.cudaErrorHardwareStackError{{endif}} + cudaErrorHardwareStackError = ( + cyruntime.cudaError.cudaErrorHardwareStackError, + 'Device encountered an error in the call stack during kernel execution,\n' + 'possibly due to stack corruption or exceeding the stack size limit. This\n' + 'leaves the process in an inconsistent state and any further CUDA work will\n' + 'return the same error. To continue using CUDA, the process must be\n' + 'terminated and relaunched.\n' + ){{endif}} {{if 'cudaErrorIllegalInstruction' in found_values}} - #: The device encountered an illegal instruction during kernel - #: execution This leaves the process in an inconsistent state and any - #: further CUDA work will return the same error. To continue using - #: CUDA, the process must be terminated and relaunched. - cudaErrorIllegalInstruction = cyruntime.cudaError.cudaErrorIllegalInstruction{{endif}} + cudaErrorIllegalInstruction = ( + cyruntime.cudaError.cudaErrorIllegalInstruction, + 'The device encountered an illegal instruction during kernel execution This\n' + 'leaves the process in an inconsistent state and any further CUDA work will\n' + 'return the same error. To continue using CUDA, the process must be\n' + 'terminated and relaunched.\n' + ){{endif}} {{if 'cudaErrorMisalignedAddress' in found_values}} - #: The device encountered a load or store instruction on a memory - #: address which is not aligned. This leaves the process in an - #: inconsistent state and any further CUDA work will return the same - #: error. To continue using CUDA, the process must be terminated and - #: relaunched. - cudaErrorMisalignedAddress = cyruntime.cudaError.cudaErrorMisalignedAddress{{endif}} + cudaErrorMisalignedAddress = ( + cyruntime.cudaError.cudaErrorMisalignedAddress, + 'The device encountered a load or store instruction on a memory address\n' + 'which is not aligned. This leaves the process in an inconsistent state and\n' + 'any further CUDA work will return the same error. To continue using CUDA,\n' + 'the process must be terminated and relaunched.\n' + ){{endif}} {{if 'cudaErrorInvalidAddressSpace' in found_values}} - #: While executing a kernel, the device encountered an instruction - #: which can only operate on memory locations in certain address spaces - #: (global, shared, or local), but was supplied a memory address not - #: belonging to an allowed address space. This leaves the process in an - #: inconsistent state and any further CUDA work will return the same - #: error. To continue using CUDA, the process must be terminated and - #: relaunched. - cudaErrorInvalidAddressSpace = cyruntime.cudaError.cudaErrorInvalidAddressSpace{{endif}} + cudaErrorInvalidAddressSpace = ( + cyruntime.cudaError.cudaErrorInvalidAddressSpace, + 'While executing a kernel, the device encountered an instruction which can\n' + 'only operate on memory locations in certain address spaces (global, shared,\n' + 'or local), but was supplied a memory address not belonging to an allowed\n' + 'address space. This leaves the process in an inconsistent state and any\n' + 'further CUDA work will return the same error. To continue using CUDA, the\n' + 'process must be terminated and relaunched.\n' + ){{endif}} {{if 'cudaErrorInvalidPc' in found_values}} - #: The device encountered an invalid program counter. This leaves the - #: process in an inconsistent state and any further CUDA work will - #: return the same error. To continue using CUDA, the process must be - #: terminated and relaunched. - cudaErrorInvalidPc = cyruntime.cudaError.cudaErrorInvalidPc{{endif}} + cudaErrorInvalidPc = ( + cyruntime.cudaError.cudaErrorInvalidPc, + 'The device encountered an invalid program counter. This leaves the process\n' + 'in an inconsistent state and any further CUDA work will return the same\n' + 'error. To continue using CUDA, the process must be terminated and\n' + 'relaunched.\n' + ){{endif}} {{if 'cudaErrorLaunchFailure' in found_values}} - #: An exception occurred on the device while executing a kernel. Common - #: causes include dereferencing an invalid device pointer and accessing - #: out of bounds shared memory. Less common cases can be system - #: specific - more information about these cases can be found in the - #: system specific user guide. This leaves the process in an - #: inconsistent state and any further CUDA work will return the same - #: error. To continue using CUDA, the process must be terminated and - #: relaunched. - cudaErrorLaunchFailure = cyruntime.cudaError.cudaErrorLaunchFailure{{endif}} + cudaErrorLaunchFailure = ( + cyruntime.cudaError.cudaErrorLaunchFailure, + 'An exception occurred on the device while executing a kernel. Common causes\n' + 'include dereferencing an invalid device pointer and accessing out of bounds\n' + 'shared memory. Less common cases can be system specific - more information\n' + 'about these cases can be found in the system specific user guide. This\n' + 'leaves the process in an inconsistent state and any further CUDA work will\n' + 'return the same error. To continue using CUDA, the process must be\n' + 'terminated and relaunched.\n' + ){{endif}} {{if 'cudaErrorCooperativeLaunchTooLarge' in found_values}} - #: This error indicates that the number of blocks launched per grid for - #: a kernel that was launched via either - #: :py:obj:`~.cudaLaunchCooperativeKernel` exceeds the maximum number - #: of blocks as allowed by - #: :py:obj:`~.cudaOccupancyMaxActiveBlocksPerMultiprocessor` or - #: :py:obj:`~.cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags` - #: times the number of multiprocessors as specified by the device - #: attribute :py:obj:`~.cudaDevAttrMultiProcessorCount`. - cudaErrorCooperativeLaunchTooLarge = cyruntime.cudaError.cudaErrorCooperativeLaunchTooLarge{{endif}} + cudaErrorCooperativeLaunchTooLarge = ( + cyruntime.cudaError.cudaErrorCooperativeLaunchTooLarge, + 'This error indicates that the number of blocks launched per grid for a\n' + 'kernel that was launched via either :py:obj:`~.cudaLaunchCooperativeKernel`\n' + 'exceeds the maximum number of blocks as allowed by\n' + ':py:obj:`~.cudaOccupancyMaxActiveBlocksPerMultiprocessor` or\n' + ':py:obj:`~.cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags` times\n' + 'the number of multiprocessors as specified by the device attribute\n' + ':py:obj:`~.cudaDevAttrMultiProcessorCount`.\n' + ){{endif}} {{if 'cudaErrorTensorMemoryLeak' in found_values}} - #: An exception occurred on the device while exiting a kernel using - #: tensor memory: the tensor memory was not completely deallocated. - #: This leaves the process in an inconsistent state and any further - #: CUDA work will return the same error. To continue using CUDA, the - #: process must be terminated and relaunched. - cudaErrorTensorMemoryLeak = cyruntime.cudaError.cudaErrorTensorMemoryLeak{{endif}} + cudaErrorTensorMemoryLeak = ( + cyruntime.cudaError.cudaErrorTensorMemoryLeak, + 'An exception occurred on the device while exiting a kernel using tensor\n' + 'memory: the tensor memory was not completely deallocated. This leaves the\n' + 'process in an inconsistent state and any further CUDA work will return the\n' + 'same error. To continue using CUDA, the process must be terminated and\n' + 'relaunched.\n' + ){{endif}} {{if 'cudaErrorNotPermitted' in found_values}} - #: This error indicates the attempted operation is not permitted. - cudaErrorNotPermitted = cyruntime.cudaError.cudaErrorNotPermitted{{endif}} + cudaErrorNotPermitted = ( + cyruntime.cudaError.cudaErrorNotPermitted, + 'This error indicates the attempted operation is not permitted.\n' + ){{endif}} {{if 'cudaErrorNotSupported' in found_values}} - #: This error indicates the attempted operation is not supported on the - #: current system or device. - cudaErrorNotSupported = cyruntime.cudaError.cudaErrorNotSupported{{endif}} + cudaErrorNotSupported = ( + cyruntime.cudaError.cudaErrorNotSupported, + 'This error indicates the attempted operation is not supported on the\n' + 'current system or device.\n' + ){{endif}} {{if 'cudaErrorSystemNotReady' in found_values}} - #: This error indicates that the system is not yet ready to start any - #: CUDA work. To continue using CUDA, verify the system configuration - #: is in a valid state and all required driver daemons are actively - #: running. More information about this error can be found in the - #: system specific user guide. - cudaErrorSystemNotReady = cyruntime.cudaError.cudaErrorSystemNotReady{{endif}} + cudaErrorSystemNotReady = ( + cyruntime.cudaError.cudaErrorSystemNotReady, + 'This error indicates that the system is not yet ready to start any CUDA\n' + 'work. To continue using CUDA, verify the system configuration is in a valid\n' + 'state and all required driver daemons are actively running. More\n' + 'information about this error can be found in the system specific user\n' + 'guide.\n' + ){{endif}} {{if 'cudaErrorSystemDriverMismatch' in found_values}} - #: This error indicates that there is a mismatch between the versions - #: of the display driver and the CUDA driver. Refer to the - #: compatibility documentation for supported versions. - cudaErrorSystemDriverMismatch = cyruntime.cudaError.cudaErrorSystemDriverMismatch{{endif}} + cudaErrorSystemDriverMismatch = ( + cyruntime.cudaError.cudaErrorSystemDriverMismatch, + 'This error indicates that there is a mismatch between the versions of the\n' + 'display driver and the CUDA driver. Refer to the compatibility\n' + 'documentation for supported versions.\n' + ){{endif}} {{if 'cudaErrorCompatNotSupportedOnDevice' in found_values}} - #: This error indicates that the system was upgraded to run with - #: forward compatibility but the visible hardware detected by CUDA does - #: not support this configuration. Refer to the compatibility - #: documentation for the supported hardware matrix or ensure that only - #: supported hardware is visible during initialization via the - #: CUDA_VISIBLE_DEVICES environment variable. - cudaErrorCompatNotSupportedOnDevice = cyruntime.cudaError.cudaErrorCompatNotSupportedOnDevice{{endif}} + cudaErrorCompatNotSupportedOnDevice = ( + cyruntime.cudaError.cudaErrorCompatNotSupportedOnDevice, + 'This error indicates that the system was upgraded to run with forward\n' + 'compatibility but the visible hardware detected by CUDA does not support\n' + 'this configuration. Refer to the compatibility documentation for the\n' + 'supported hardware matrix or ensure that only supported hardware is visible\n' + 'during initialization via the CUDA_VISIBLE_DEVICES environment variable.\n' + ){{endif}} {{if 'cudaErrorMpsConnectionFailed' in found_values}} - #: This error indicates that the MPS client failed to connect to the - #: MPS control daemon or the MPS server. - cudaErrorMpsConnectionFailed = cyruntime.cudaError.cudaErrorMpsConnectionFailed{{endif}} + cudaErrorMpsConnectionFailed = ( + cyruntime.cudaError.cudaErrorMpsConnectionFailed, + 'This error indicates that the MPS client failed to connect to the MPS\n' + 'control daemon or the MPS server.\n' + ){{endif}} {{if 'cudaErrorMpsRpcFailure' in found_values}} - #: This error indicates that the remote procedural call between the MPS - #: server and the MPS client failed. - cudaErrorMpsRpcFailure = cyruntime.cudaError.cudaErrorMpsRpcFailure{{endif}} + cudaErrorMpsRpcFailure = ( + cyruntime.cudaError.cudaErrorMpsRpcFailure, + 'This error indicates that the remote procedural call between the MPS server\n' + 'and the MPS client failed.\n' + ){{endif}} {{if 'cudaErrorMpsServerNotReady' in found_values}} - #: This error indicates that the MPS server is not ready to accept new - #: MPS client requests. This error can be returned when the MPS server - #: is in the process of recovering from a fatal failure. - cudaErrorMpsServerNotReady = cyruntime.cudaError.cudaErrorMpsServerNotReady{{endif}} + cudaErrorMpsServerNotReady = ( + cyruntime.cudaError.cudaErrorMpsServerNotReady, + 'This error indicates that the MPS server is not ready to accept new MPS\n' + 'client requests. This error can be returned when the MPS server is in the\n' + 'process of recovering from a fatal failure.\n' + ){{endif}} {{if 'cudaErrorMpsMaxClientsReached' in found_values}} - #: This error indicates that the hardware resources required to create - #: MPS client have been exhausted. - cudaErrorMpsMaxClientsReached = cyruntime.cudaError.cudaErrorMpsMaxClientsReached{{endif}} + cudaErrorMpsMaxClientsReached = ( + cyruntime.cudaError.cudaErrorMpsMaxClientsReached, + 'This error indicates that the hardware resources required to create MPS\n' + 'client have been exhausted.\n' + ){{endif}} {{if 'cudaErrorMpsMaxConnectionsReached' in found_values}} - #: This error indicates the the hardware resources required to device - #: connections have been exhausted. - cudaErrorMpsMaxConnectionsReached = cyruntime.cudaError.cudaErrorMpsMaxConnectionsReached{{endif}} + cudaErrorMpsMaxConnectionsReached = ( + cyruntime.cudaError.cudaErrorMpsMaxConnectionsReached, + 'This error indicates the the hardware resources required to device\n' + 'connections have been exhausted.\n' + ){{endif}} {{if 'cudaErrorMpsClientTerminated' in found_values}} - #: This error indicates that the MPS client has been terminated by the - #: server. To continue using CUDA, the process must be terminated and - #: relaunched. - cudaErrorMpsClientTerminated = cyruntime.cudaError.cudaErrorMpsClientTerminated{{endif}} + cudaErrorMpsClientTerminated = ( + cyruntime.cudaError.cudaErrorMpsClientTerminated, + 'This error indicates that the MPS client has been terminated by the server.\n' + 'To continue using CUDA, the process must be terminated and relaunched.\n' + ){{endif}} {{if 'cudaErrorCdpNotSupported' in found_values}} - #: This error indicates, that the program is using CUDA Dynamic - #: Parallelism, but the current configuration, like MPS, does not - #: support it. - cudaErrorCdpNotSupported = cyruntime.cudaError.cudaErrorCdpNotSupported{{endif}} + cudaErrorCdpNotSupported = ( + cyruntime.cudaError.cudaErrorCdpNotSupported, + 'This error indicates, that the program is using CUDA Dynamic Parallelism,\n' + 'but the current configuration, like MPS, does not support it.\n' + ){{endif}} {{if 'cudaErrorCdpVersionMismatch' in found_values}} - #: This error indicates, that the program contains an unsupported - #: interaction between different versions of CUDA Dynamic Parallelism. - cudaErrorCdpVersionMismatch = cyruntime.cudaError.cudaErrorCdpVersionMismatch{{endif}} + cudaErrorCdpVersionMismatch = ( + cyruntime.cudaError.cudaErrorCdpVersionMismatch, + 'This error indicates, that the program contains an unsupported interaction\n' + 'between different versions of CUDA Dynamic Parallelism.\n' + ){{endif}} {{if 'cudaErrorStreamCaptureUnsupported' in found_values}} - #: The operation is not permitted when the stream is capturing. - cudaErrorStreamCaptureUnsupported = cyruntime.cudaError.cudaErrorStreamCaptureUnsupported{{endif}} + cudaErrorStreamCaptureUnsupported = ( + cyruntime.cudaError.cudaErrorStreamCaptureUnsupported, + 'The operation is not permitted when the stream is capturing.\n' + ){{endif}} {{if 'cudaErrorStreamCaptureInvalidated' in found_values}} - #: The current capture sequence on the stream has been invalidated due - #: to a previous error. - cudaErrorStreamCaptureInvalidated = cyruntime.cudaError.cudaErrorStreamCaptureInvalidated{{endif}} + cudaErrorStreamCaptureInvalidated = ( + cyruntime.cudaError.cudaErrorStreamCaptureInvalidated, + 'The current capture sequence on the stream has been invalidated due to a\n' + 'previous error.\n' + ){{endif}} {{if 'cudaErrorStreamCaptureMerge' in found_values}} - #: The operation would have resulted in a merge of two independent - #: capture sequences. - cudaErrorStreamCaptureMerge = cyruntime.cudaError.cudaErrorStreamCaptureMerge{{endif}} + cudaErrorStreamCaptureMerge = ( + cyruntime.cudaError.cudaErrorStreamCaptureMerge, + 'The operation would have resulted in a merge of two independent capture\n' + 'sequences.\n' + ){{endif}} {{if 'cudaErrorStreamCaptureUnmatched' in found_values}} - #: The capture was not initiated in this stream. - cudaErrorStreamCaptureUnmatched = cyruntime.cudaError.cudaErrorStreamCaptureUnmatched{{endif}} + cudaErrorStreamCaptureUnmatched = ( + cyruntime.cudaError.cudaErrorStreamCaptureUnmatched, + 'The capture was not initiated in this stream.\n' + ){{endif}} {{if 'cudaErrorStreamCaptureUnjoined' in found_values}} - #: The capture sequence contains a fork that was not joined to the - #: primary stream. - cudaErrorStreamCaptureUnjoined = cyruntime.cudaError.cudaErrorStreamCaptureUnjoined{{endif}} + cudaErrorStreamCaptureUnjoined = ( + cyruntime.cudaError.cudaErrorStreamCaptureUnjoined, + 'The capture sequence contains a fork that was not joined to the primary\n' + 'stream.\n' + ){{endif}} {{if 'cudaErrorStreamCaptureIsolation' in found_values}} - #: A dependency would have been created which crosses the capture - #: sequence boundary. Only implicit in-stream ordering dependencies are - #: allowed to cross the boundary. - cudaErrorStreamCaptureIsolation = cyruntime.cudaError.cudaErrorStreamCaptureIsolation{{endif}} + cudaErrorStreamCaptureIsolation = ( + cyruntime.cudaError.cudaErrorStreamCaptureIsolation, + 'A dependency would have been created which crosses the capture sequence\n' + 'boundary. Only implicit in-stream ordering dependencies are allowed to\n' + 'cross the boundary.\n' + ){{endif}} {{if 'cudaErrorStreamCaptureImplicit' in found_values}} - #: The operation would have resulted in a disallowed implicit - #: dependency on a current capture sequence from cudaStreamLegacy. - cudaErrorStreamCaptureImplicit = cyruntime.cudaError.cudaErrorStreamCaptureImplicit{{endif}} + cudaErrorStreamCaptureImplicit = ( + cyruntime.cudaError.cudaErrorStreamCaptureImplicit, + 'The operation would have resulted in a disallowed implicit dependency on a\n' + 'current capture sequence from cudaStreamLegacy.\n' + ){{endif}} {{if 'cudaErrorCapturedEvent' in found_values}} - #: The operation is not permitted on an event which was last recorded - #: in a capturing stream. - cudaErrorCapturedEvent = cyruntime.cudaError.cudaErrorCapturedEvent{{endif}} + cudaErrorCapturedEvent = ( + cyruntime.cudaError.cudaErrorCapturedEvent, + 'The operation is not permitted on an event which was last recorded in a\n' + 'capturing stream.\n' + ){{endif}} {{if 'cudaErrorStreamCaptureWrongThread' in found_values}} - #: A stream capture sequence not initiated with the - #: :py:obj:`~.cudaStreamCaptureModeRelaxed` argument to - #: :py:obj:`~.cudaStreamBeginCapture` was passed to - #: :py:obj:`~.cudaStreamEndCapture` in a different thread. - cudaErrorStreamCaptureWrongThread = cyruntime.cudaError.cudaErrorStreamCaptureWrongThread{{endif}} + cudaErrorStreamCaptureWrongThread = ( + cyruntime.cudaError.cudaErrorStreamCaptureWrongThread, + 'A stream capture sequence not initiated with the\n' + ':py:obj:`~.cudaStreamCaptureModeRelaxed` argument to\n' + ':py:obj:`~.cudaStreamBeginCapture` was passed to\n' + ':py:obj:`~.cudaStreamEndCapture` in a different thread.\n' + ){{endif}} {{if 'cudaErrorTimeout' in found_values}} - #: This indicates that the wait operation has timed out. - cudaErrorTimeout = cyruntime.cudaError.cudaErrorTimeout{{endif}} + cudaErrorTimeout = ( + cyruntime.cudaError.cudaErrorTimeout, + 'This indicates that the wait operation has timed out.\n' + ){{endif}} {{if 'cudaErrorGraphExecUpdateFailure' in found_values}} - #: This error indicates that the graph update was not performed because - #: it included changes which violated constraints specific to - #: instantiated graph update. - cudaErrorGraphExecUpdateFailure = cyruntime.cudaError.cudaErrorGraphExecUpdateFailure{{endif}} + cudaErrorGraphExecUpdateFailure = ( + cyruntime.cudaError.cudaErrorGraphExecUpdateFailure, + 'This error indicates that the graph update was not performed because it\n' + 'included changes which violated constraints specific to instantiated graph\n' + 'update.\n' + ){{endif}} {{if 'cudaErrorExternalDevice' in found_values}} - #: This indicates that an async error has occurred in a device outside - #: of CUDA. If CUDA was waiting for an external device's signal before - #: consuming shared data, the external device signaled an error - #: indicating that the data is not valid for consumption. This leaves - #: the process in an inconsistent state and any further CUDA work will - #: return the same error. To continue using CUDA, the process must be - #: terminated and relaunched. - cudaErrorExternalDevice = cyruntime.cudaError.cudaErrorExternalDevice{{endif}} + cudaErrorExternalDevice = ( + cyruntime.cudaError.cudaErrorExternalDevice, + 'This indicates that an async error has occurred in a device outside of\n' + "CUDA. If CUDA was waiting for an external device's signal before consuming\n" + 'shared data, the external device signaled an error indicating that the data\n' + 'is not valid for consumption. This leaves the process in an inconsistent\n' + 'state and any further CUDA work will return the same error. To continue\n' + 'using CUDA, the process must be terminated and relaunched.\n' + ){{endif}} {{if 'cudaErrorInvalidClusterSize' in found_values}} - #: This indicates that a kernel launch error has occurred due to - #: cluster misconfiguration. - cudaErrorInvalidClusterSize = cyruntime.cudaError.cudaErrorInvalidClusterSize{{endif}} + cudaErrorInvalidClusterSize = ( + cyruntime.cudaError.cudaErrorInvalidClusterSize, + 'This indicates that a kernel launch error has occurred due to cluster\n' + 'misconfiguration.\n' + ){{endif}} {{if 'cudaErrorFunctionNotLoaded' in found_values}} - #: Indiciates a function handle is not loaded when calling an API that - #: requires a loaded function. - cudaErrorFunctionNotLoaded = cyruntime.cudaError.cudaErrorFunctionNotLoaded{{endif}} + cudaErrorFunctionNotLoaded = ( + cyruntime.cudaError.cudaErrorFunctionNotLoaded, + 'Indiciates a function handle is not loaded when calling an API that\n' + 'requires a loaded function.\n' + ){{endif}} {{if 'cudaErrorInvalidResourceType' in found_values}} - #: This error indicates one or more resources passed in are not valid - #: resource types for the operation. - cudaErrorInvalidResourceType = cyruntime.cudaError.cudaErrorInvalidResourceType{{endif}} + cudaErrorInvalidResourceType = ( + cyruntime.cudaError.cudaErrorInvalidResourceType, + 'This error indicates one or more resources passed in are not valid resource\n' + 'types for the operation.\n' + ){{endif}} {{if 'cudaErrorInvalidResourceConfiguration' in found_values}} - #: This error indicates one or more resources are insufficient or non- - #: applicable for the operation. - cudaErrorInvalidResourceConfiguration = cyruntime.cudaError.cudaErrorInvalidResourceConfiguration{{endif}} + cudaErrorInvalidResourceConfiguration = ( + cyruntime.cudaError.cudaErrorInvalidResourceConfiguration, + 'This error indicates one or more resources are insufficient or non-\n' + 'applicable for the operation.\n' + ){{endif}} {{if 'cudaErrorStreamDetached' in found_values}} - #: This error indicates that the requested operation is not permitted - #: because the stream is in a detached state. This can occur if the - #: green context associated with the stream has been destroyed, - #: limiting the stream's operational capabilities. - cudaErrorStreamDetached = cyruntime.cudaError.cudaErrorStreamDetached{{endif}} + cudaErrorStreamDetached = ( + cyruntime.cudaError.cudaErrorStreamDetached, + 'This error indicates that the requested operation is not permitted because\n' + 'the stream is in a detached state. This can occur if the green context\n' + "associated with the stream has been destroyed, limiting the stream's\n" + 'operational capabilities.\n' + ){{endif}} {{if 'cudaErrorUnknown' in found_values}} - #: This indicates that an unknown internal error has occurred. - cudaErrorUnknown = cyruntime.cudaError.cudaErrorUnknown{{endif}} + cudaErrorUnknown = ( + cyruntime.cudaError.cudaErrorUnknown, + 'This indicates that an unknown internal error has occurred.\n' + ){{endif}} {{if 'cudaErrorApiFailureBase' in found_values}} cudaErrorApiFailureBase = cyruntime.cudaError.cudaErrorApiFailureBase{{endif}} -_dict_cudaError_t = dict(((int(v), v) for k, v in cudaError_t.__members__.items())) {{endif}} {{if 'cudaGraphDependencyType_enum' in found_types}} -class cudaGraphDependencyType(IntEnum): +class cudaGraphDependencyType(_FastEnum): """ Type annotations that can be applied to graph edges as part of :py:obj:`~.cudaGraphEdgeData`. """ {{if 'cudaGraphDependencyTypeDefault' in found_values}} - #: This is an ordinary dependency. - cudaGraphDependencyTypeDefault = cyruntime.cudaGraphDependencyType_enum.cudaGraphDependencyTypeDefault{{endif}} + cudaGraphDependencyTypeDefault = ( + cyruntime.cudaGraphDependencyType_enum.cudaGraphDependencyTypeDefault, + 'This is an ordinary dependency.\n' + ){{endif}} {{if 'cudaGraphDependencyTypeProgrammatic' in found_values}} - #: This dependency type allows the downstream node to use - #: `cudaGridDependencySynchronize()`. It may only be used between - #: kernel nodes, and must be used with either the - #: :py:obj:`~.cudaGraphKernelNodePortProgrammatic` or - #: :py:obj:`~.cudaGraphKernelNodePortLaunchCompletion` outgoing port. - cudaGraphDependencyTypeProgrammatic = cyruntime.cudaGraphDependencyType_enum.cudaGraphDependencyTypeProgrammatic{{endif}} + cudaGraphDependencyTypeProgrammatic = ( + cyruntime.cudaGraphDependencyType_enum.cudaGraphDependencyTypeProgrammatic, + 'This dependency type allows the downstream node to use\n' + '`cudaGridDependencySynchronize()`. It may only be used between kernel\n' + 'nodes, and must be used with either the\n' + ':py:obj:`~.cudaGraphKernelNodePortProgrammatic` or\n' + ':py:obj:`~.cudaGraphKernelNodePortLaunchCompletion` outgoing port.\n' + ){{endif}} -_dict_cudaGraphDependencyType = dict(((int(v), v) for k, v in cudaGraphDependencyType.__members__.items())) {{endif}} {{if 'cudaGraphInstantiateResult' in found_types}} -class cudaGraphInstantiateResult(IntEnum): +class cudaGraphInstantiateResult(_FastEnum): """ Graph instantiation results """ {{if 'cudaGraphInstantiateSuccess' in found_values}} - #: Instantiation succeeded - cudaGraphInstantiateSuccess = cyruntime.cudaGraphInstantiateResult.cudaGraphInstantiateSuccess{{endif}} + cudaGraphInstantiateSuccess = ( + cyruntime.cudaGraphInstantiateResult.cudaGraphInstantiateSuccess, + 'Instantiation succeeded\n' + ){{endif}} {{if 'cudaGraphInstantiateError' in found_values}} - #: Instantiation failed for an unexpected reason which is described in - #: the return value of the function - cudaGraphInstantiateError = cyruntime.cudaGraphInstantiateResult.cudaGraphInstantiateError{{endif}} + cudaGraphInstantiateError = ( + cyruntime.cudaGraphInstantiateResult.cudaGraphInstantiateError, + 'Instantiation failed for an unexpected reason which is described in the\n' + 'return value of the function\n' + ){{endif}} {{if 'cudaGraphInstantiateInvalidStructure' in found_values}} - #: Instantiation failed due to invalid structure, such as cycles - cudaGraphInstantiateInvalidStructure = cyruntime.cudaGraphInstantiateResult.cudaGraphInstantiateInvalidStructure{{endif}} + cudaGraphInstantiateInvalidStructure = ( + cyruntime.cudaGraphInstantiateResult.cudaGraphInstantiateInvalidStructure, + 'Instantiation failed due to invalid structure, such as cycles\n' + ){{endif}} {{if 'cudaGraphInstantiateNodeOperationNotSupported' in found_values}} - #: Instantiation for device launch failed because the graph contained - #: an unsupported operation - cudaGraphInstantiateNodeOperationNotSupported = cyruntime.cudaGraphInstantiateResult.cudaGraphInstantiateNodeOperationNotSupported{{endif}} + cudaGraphInstantiateNodeOperationNotSupported = ( + cyruntime.cudaGraphInstantiateResult.cudaGraphInstantiateNodeOperationNotSupported, + 'Instantiation for device launch failed because the graph contained an\n' + 'unsupported operation\n' + ){{endif}} {{if 'cudaGraphInstantiateMultipleDevicesNotSupported' in found_values}} - #: Instantiation for device launch failed due to the nodes belonging to - #: different contexts - cudaGraphInstantiateMultipleDevicesNotSupported = cyruntime.cudaGraphInstantiateResult.cudaGraphInstantiateMultipleDevicesNotSupported{{endif}} + cudaGraphInstantiateMultipleDevicesNotSupported = ( + cyruntime.cudaGraphInstantiateResult.cudaGraphInstantiateMultipleDevicesNotSupported, + 'Instantiation for device launch failed due to the nodes belonging to\n' + 'different contexts\n' + ){{endif}} {{if 'cudaGraphInstantiateConditionalHandleUnused' in found_values}} - #: One or more conditional handles are not associated with conditional - #: nodes - cudaGraphInstantiateConditionalHandleUnused = cyruntime.cudaGraphInstantiateResult.cudaGraphInstantiateConditionalHandleUnused{{endif}} + cudaGraphInstantiateConditionalHandleUnused = ( + cyruntime.cudaGraphInstantiateResult.cudaGraphInstantiateConditionalHandleUnused, + 'One or more conditional handles are not associated with conditional nodes\n' + ){{endif}} -_dict_cudaGraphInstantiateResult = dict(((int(v), v) for k, v in cudaGraphInstantiateResult.__members__.items())) {{endif}} {{if 'cudaLaunchMemSyncDomain' in found_types}} -class cudaLaunchMemSyncDomain(IntEnum): +class cudaLaunchMemSyncDomain(_FastEnum): """ Memory Synchronization Domain A kernel can be launched in a specified memory synchronization domain that affects all memory @@ -1246,245 +1497,266 @@ class cudaLaunchMemSyncDomain(IntEnum): """ {{if 'cudaLaunchMemSyncDomainDefault' in found_values}} - #: Launch kernels in the default domain - cudaLaunchMemSyncDomainDefault = cyruntime.cudaLaunchMemSyncDomain.cudaLaunchMemSyncDomainDefault{{endif}} + cudaLaunchMemSyncDomainDefault = ( + cyruntime.cudaLaunchMemSyncDomain.cudaLaunchMemSyncDomainDefault, + 'Launch kernels in the default domain\n' + ){{endif}} {{if 'cudaLaunchMemSyncDomainRemote' in found_values}} - #: Launch kernels in the remote domain - cudaLaunchMemSyncDomainRemote = cyruntime.cudaLaunchMemSyncDomain.cudaLaunchMemSyncDomainRemote{{endif}} + cudaLaunchMemSyncDomainRemote = ( + cyruntime.cudaLaunchMemSyncDomain.cudaLaunchMemSyncDomainRemote, + 'Launch kernels in the remote domain\n' + ){{endif}} -_dict_cudaLaunchMemSyncDomain = dict(((int(v), v) for k, v in cudaLaunchMemSyncDomain.__members__.items())) {{endif}} {{if 'cudaLaunchAttributeID' in found_types}} -class cudaLaunchAttributeID(IntEnum): +class cudaLaunchAttributeID(_FastEnum): """ Launch attributes enum; used as id field of :py:obj:`~.cudaLaunchAttribute` """ {{if 'cudaLaunchAttributeIgnore' in found_values}} - #: Ignored entry, for convenient composition - cudaLaunchAttributeIgnore = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeIgnore{{endif}} + cudaLaunchAttributeIgnore = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeIgnore, + 'Ignored entry, for convenient composition\n' + ){{endif}} {{if 'cudaLaunchAttributeAccessPolicyWindow' in found_values}} - #: Valid for streams, graph nodes, launches. See - #: :py:obj:`~.cudaLaunchAttributeValue.accessPolicyWindow`. - cudaLaunchAttributeAccessPolicyWindow = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeAccessPolicyWindow{{endif}} + cudaLaunchAttributeAccessPolicyWindow = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeAccessPolicyWindow, + 'Valid for streams, graph nodes, launches. See\n' + ':py:obj:`~.cudaLaunchAttributeValue.accessPolicyWindow`.\n' + ){{endif}} {{if 'cudaLaunchAttributeCooperative' in found_values}} - #: Valid for graph nodes, launches. See - #: :py:obj:`~.cudaLaunchAttributeValue.cooperative`. - cudaLaunchAttributeCooperative = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeCooperative{{endif}} + cudaLaunchAttributeCooperative = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeCooperative, + 'Valid for graph nodes, launches. See\n' + ':py:obj:`~.cudaLaunchAttributeValue.cooperative`.\n' + ){{endif}} {{if 'cudaLaunchAttributeSynchronizationPolicy' in found_values}} - #: Valid for streams. See - #: :py:obj:`~.cudaLaunchAttributeValue.syncPolicy`. - cudaLaunchAttributeSynchronizationPolicy = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeSynchronizationPolicy{{endif}} + cudaLaunchAttributeSynchronizationPolicy = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeSynchronizationPolicy, + 'Valid for streams. See :py:obj:`~.cudaLaunchAttributeValue.syncPolicy`.\n' + ){{endif}} {{if 'cudaLaunchAttributeClusterDimension' in found_values}} - #: Valid for graph nodes, launches. See - #: :py:obj:`~.cudaLaunchAttributeValue.clusterDim`. - cudaLaunchAttributeClusterDimension = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeClusterDimension{{endif}} + cudaLaunchAttributeClusterDimension = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeClusterDimension, + 'Valid for graph nodes, launches. See\n' + ':py:obj:`~.cudaLaunchAttributeValue.clusterDim`.\n' + ){{endif}} {{if 'cudaLaunchAttributeClusterSchedulingPolicyPreference' in found_values}} - #: Valid for graph nodes, launches. See - #: :py:obj:`~.cudaLaunchAttributeValue.clusterSchedulingPolicyPreference`. - cudaLaunchAttributeClusterSchedulingPolicyPreference = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeClusterSchedulingPolicyPreference{{endif}} + cudaLaunchAttributeClusterSchedulingPolicyPreference = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeClusterSchedulingPolicyPreference, + 'Valid for graph nodes, launches. See\n' + ':py:obj:`~.cudaLaunchAttributeValue.clusterSchedulingPolicyPreference`.\n' + ){{endif}} {{if 'cudaLaunchAttributeProgrammaticStreamSerialization' in found_values}} - #: Valid for launches. Setting - #: :py:obj:`~.cudaLaunchAttributeValue.programmaticStreamSerializationAllowed` - #: to non-0 signals that the kernel will use programmatic means to - #: resolve its stream dependency, so that the CUDA runtime should - #: opportunistically allow the grid's execution to overlap with the - #: previous kernel in the stream, if that kernel requests the overlap. - #: The dependent launches can choose to wait on the dependency using - #: the programmatic sync (cudaGridDependencySynchronize() or equivalent - #: PTX instructions). - cudaLaunchAttributeProgrammaticStreamSerialization = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeProgrammaticStreamSerialization{{endif}} + cudaLaunchAttributeProgrammaticStreamSerialization = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeProgrammaticStreamSerialization, + 'Valid for launches. Setting\n' + ':py:obj:`~.cudaLaunchAttributeValue.programmaticStreamSerializationAllowed`\n' + 'to non-0 signals that the kernel will use programmatic means to resolve its\n' + 'stream dependency, so that the CUDA runtime should opportunistically allow\n' + "the grid's execution to overlap with the previous kernel in the stream, if\n" + 'that kernel requests the overlap. The dependent launches can choose to wait\n' + 'on the dependency using the programmatic sync\n' + '(cudaGridDependencySynchronize() or equivalent PTX instructions).\n' + ){{endif}} {{if 'cudaLaunchAttributeProgrammaticEvent' in found_values}} - #: Valid for launches. Set - #: :py:obj:`~.cudaLaunchAttributeValue.programmaticEvent` to record the - #: event. Event recorded through this launch attribute is guaranteed to - #: only trigger after all block in the associated kernel trigger the - #: event. A block can trigger the event programmatically in a future - #: CUDA release. A trigger can also be inserted at the beginning of - #: each block's execution if triggerAtBlockStart is set to non-0. The - #: dependent launches can choose to wait on the dependency using the - #: programmatic sync (cudaGridDependencySynchronize() or equivalent PTX - #: instructions). Note that dependents (including the CPU thread - #: calling :py:obj:`~.cudaEventSynchronize()`) are not guaranteed to - #: observe the release precisely when it is released. For example, - #: :py:obj:`~.cudaEventSynchronize()` may only observe the event - #: trigger long after the associated kernel has completed. This - #: recording type is primarily meant for establishing programmatic - #: dependency between device tasks. Note also this type of dependency - #: allows, but does not guarantee, concurrent execution of tasks. - #: The event supplied must not be an interprocess or interop event. - #: The event must disable timing (i.e. must be created with the - #: :py:obj:`~.cudaEventDisableTiming` flag set). - cudaLaunchAttributeProgrammaticEvent = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeProgrammaticEvent{{endif}} + cudaLaunchAttributeProgrammaticEvent = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeProgrammaticEvent, + 'Valid for launches. Set\n' + ':py:obj:`~.cudaLaunchAttributeValue.programmaticEvent` to record the event.\n' + 'Event recorded through this launch attribute is guaranteed to only trigger\n' + 'after all block in the associated kernel trigger the event. A block can\n' + 'trigger the event programmatically in a future CUDA release. A trigger can\n' + "also be inserted at the beginning of each block's execution if\n" + 'triggerAtBlockStart is set to non-0. The dependent launches can choose to\n' + 'wait on the dependency using the programmatic sync\n' + '(cudaGridDependencySynchronize() or equivalent PTX instructions). Note that\n' + 'dependents (including the CPU thread calling\n' + ':py:obj:`~.cudaEventSynchronize()`) are not guaranteed to observe the\n' + 'release precisely when it is released. For example,\n' + ':py:obj:`~.cudaEventSynchronize()` may only observe the event trigger long\n' + 'after the associated kernel has completed. This recording type is primarily\n' + 'meant for establishing programmatic dependency between device tasks. Note\n' + 'also this type of dependency allows, but does not guarantee, concurrent\n' + 'execution of tasks.\n' + ' The event supplied must not be an interprocess or interop event. The event\n' + 'must disable timing (i.e. must be created with the\n' + ':py:obj:`~.cudaEventDisableTiming` flag set).\n' + ){{endif}} {{if 'cudaLaunchAttributePriority' in found_values}} - #: Valid for streams, graph nodes, launches. See - #: :py:obj:`~.cudaLaunchAttributeValue.priority`. - cudaLaunchAttributePriority = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePriority{{endif}} + cudaLaunchAttributePriority = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePriority, + 'Valid for streams, graph nodes, launches. See\n' + ':py:obj:`~.cudaLaunchAttributeValue.priority`.\n' + ){{endif}} {{if 'cudaLaunchAttributeMemSyncDomainMap' in found_values}} - #: Valid for streams, graph nodes, launches. See - #: :py:obj:`~.cudaLaunchAttributeValue.memSyncDomainMap`. - cudaLaunchAttributeMemSyncDomainMap = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeMemSyncDomainMap{{endif}} + cudaLaunchAttributeMemSyncDomainMap = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeMemSyncDomainMap, + 'Valid for streams, graph nodes, launches. See\n' + ':py:obj:`~.cudaLaunchAttributeValue.memSyncDomainMap`.\n' + ){{endif}} {{if 'cudaLaunchAttributeMemSyncDomain' in found_values}} - #: Valid for streams, graph nodes, launches. See - #: :py:obj:`~.cudaLaunchAttributeValue.memSyncDomain`. - cudaLaunchAttributeMemSyncDomain = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeMemSyncDomain{{endif}} + cudaLaunchAttributeMemSyncDomain = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeMemSyncDomain, + 'Valid for streams, graph nodes, launches. See\n' + ':py:obj:`~.cudaLaunchAttributeValue.memSyncDomain`.\n' + ){{endif}} {{if 'cudaLaunchAttributePreferredClusterDimension' in found_values}} - #: Valid for graph nodes and launches. Set - #: :py:obj:`~.cudaLaunchAttributeValue.preferredClusterDim` to allow - #: the kernel launch to specify a preferred substitute cluster - #: dimension. Blocks may be grouped according to either the dimensions - #: specified with this attribute (grouped into a "preferred substitute - #: cluster"), or the one specified with - #: :py:obj:`~.cudaLaunchAttributeClusterDimension` attribute (grouped - #: into a "regular cluster"). The cluster dimensions of a "preferred - #: substitute cluster" shall be an integer multiple greater than zero - #: of the regular cluster dimensions. The device will attempt - on a - #: best-effort basis - to group thread blocks into preferred clusters - #: over grouping them into regular clusters. When it deems necessary - #: (primarily when the device temporarily runs out of physical - #: resources to launch the larger preferred clusters), the device may - #: switch to launch the regular clusters instead to attempt to utilize - #: as much of the physical device resources as possible. - #: Each type of cluster will have its enumeration / coordinate setup - #: as if the grid consists solely of its type of cluster. For example, - #: if the preferred substitute cluster dimensions double the regular - #: cluster dimensions, there might be simultaneously a regular cluster - #: indexed at (1,0,0), and a preferred cluster indexed at (1,0,0). In - #: this example, the preferred substitute cluster (1,0,0) replaces - #: regular clusters (2,0,0) and (3,0,0) and groups their blocks. - #: This attribute will only take effect when a regular cluster - #: dimension has been specified. The preferred substitute cluster - #: dimension must be an integer multiple greater than zero of the - #: regular cluster dimension and must divide the grid. It must also be - #: no more than `maxBlocksPerCluster`, if it is set in the kernel's - #: `__launch_bounds__`. Otherwise it must be less than the maximum - #: value the driver can support. Otherwise, setting this attribute to a - #: value physically unable to fit on any particular device is - #: permitted. - cudaLaunchAttributePreferredClusterDimension = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePreferredClusterDimension{{endif}} + cudaLaunchAttributePreferredClusterDimension = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePreferredClusterDimension, + 'Valid for graph nodes and launches. Set\n' + ':py:obj:`~.cudaLaunchAttributeValue.preferredClusterDim` to allow the\n' + 'kernel launch to specify a preferred substitute cluster dimension. Blocks\n' + 'may be grouped according to either the dimensions specified with this\n' + 'attribute (grouped into a "preferred substitute cluster"), or the one\n' + 'specified with :py:obj:`~.cudaLaunchAttributeClusterDimension` attribute\n' + '(grouped into a "regular cluster"). The cluster dimensions of a "preferred\n' + 'substitute cluster" shall be an integer multiple greater than zero of the\n' + 'regular cluster dimensions. The device will attempt - on a best-effort\n' + 'basis - to group thread blocks into preferred clusters over grouping them\n' + 'into regular clusters. When it deems necessary (primarily when the device\n' + 'temporarily runs out of physical resources to launch the larger preferred\n' + 'clusters), the device may switch to launch the regular clusters instead to\n' + 'attempt to utilize as much of the physical device resources as possible.\n' + ' Each type of cluster will have its enumeration / coordinate setup as if\n' + 'the grid consists solely of its type of cluster. For example, if the\n' + 'preferred substitute cluster dimensions double the regular cluster\n' + 'dimensions, there might be simultaneously a regular cluster indexed at\n' + '(1,0,0), and a preferred cluster indexed at (1,0,0). In this example, the\n' + 'preferred substitute cluster (1,0,0) replaces regular clusters (2,0,0) and\n' + '(3,0,0) and groups their blocks.\n' + ' This attribute will only take effect when a regular cluster dimension has\n' + 'been specified. The preferred substitute cluster dimension must be an\n' + 'integer multiple greater than zero of the regular cluster dimension and\n' + 'must divide the grid. It must also be no more than `maxBlocksPerCluster`,\n' + "if it is set in the kernel's `__launch_bounds__`. Otherwise it must be less\n" + 'than the maximum value the driver can support. Otherwise, setting this\n' + 'attribute to a value physically unable to fit on any particular device is\n' + 'permitted.\n' + ){{endif}} {{if 'cudaLaunchAttributeLaunchCompletionEvent' in found_values}} - #: Valid for launches. Set - #: :py:obj:`~.cudaLaunchAttributeValue.launchCompletionEvent` to record - #: the event. - #: Nominally, the event is triggered once all blocks of the kernel - #: have begun execution. Currently this is a best effort. If a kernel B - #: has a launch completion dependency on a kernel A, B may wait until A - #: is complete. Alternatively, blocks of B may begin before all blocks - #: of A have begun, for example if B can claim execution resources - #: unavailable to A (e.g. they run on different GPUs) or if B is a - #: higher priority than A. Exercise caution if such an ordering - #: inversion could lead to deadlock. - #: A launch completion event is nominally similar to a programmatic - #: event with `triggerAtBlockStart` set except that it is not visible - #: to `cudaGridDependencySynchronize()` and can be used with compute - #: capability less than 9.0. - #: The event supplied must not be an interprocess or interop event. - #: The event must disable timing (i.e. must be created with the - #: :py:obj:`~.cudaEventDisableTiming` flag set). - cudaLaunchAttributeLaunchCompletionEvent = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeLaunchCompletionEvent{{endif}} + cudaLaunchAttributeLaunchCompletionEvent = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeLaunchCompletionEvent, + 'Valid for launches. Set\n' + ':py:obj:`~.cudaLaunchAttributeValue.launchCompletionEvent` to record the\n' + 'event.\n' + ' Nominally, the event is triggered once all blocks of the kernel have begun\n' + 'execution. Currently this is a best effort. If a kernel B has a launch\n' + 'completion dependency on a kernel A, B may wait until A is complete.\n' + 'Alternatively, blocks of B may begin before all blocks of A have begun, for\n' + 'example if B can claim execution resources unavailable to A (e.g. they run\n' + 'on different GPUs) or if B is a higher priority than A. Exercise caution if\n' + 'such an ordering inversion could lead to deadlock.\n' + ' A launch completion event is nominally similar to a programmatic event\n' + 'with `triggerAtBlockStart` set except that it is not visible to\n' + '`cudaGridDependencySynchronize()` and can be used with compute capability\n' + 'less than 9.0.\n' + ' The event supplied must not be an interprocess or interop event. The event\n' + 'must disable timing (i.e. must be created with the\n' + ':py:obj:`~.cudaEventDisableTiming` flag set).\n' + ){{endif}} {{if 'cudaLaunchAttributeDeviceUpdatableKernelNode' in found_values}} - #: Valid for graph nodes, launches. This attribute is graphs-only, and - #: passing it to a launch in a non-capturing stream will result in an - #: error. - #: :cudaLaunchAttributeValue::deviceUpdatableKernelNode::deviceUpdatable - #: can only be set to 0 or 1. Setting the field to 1 indicates that the - #: corresponding kernel node should be device-updatable. On success, a - #: handle will be returned via - #: :py:obj:`~.cudaLaunchAttributeValue`::deviceUpdatableKernelNode::devNode - #: which can be passed to the various device-side update functions to - #: update the node's kernel parameters from within another kernel. For - #: more information on the types of device updates that can be made, as - #: well as the relevant limitations thereof, see - #: :py:obj:`~.cudaGraphKernelNodeUpdatesApply`. - #: Nodes which are device-updatable have additional restrictions - #: compared to regular kernel nodes. Firstly, device-updatable nodes - #: cannot be removed from their graph via - #: :py:obj:`~.cudaGraphDestroyNode`. Additionally, once opted-in to - #: this functionality, a node cannot opt out, and any attempt to set - #: the deviceUpdatable attribute to 0 will result in an error. Device- - #: updatable kernel nodes also cannot have their attributes copied - #: to/from another kernel node via - #: :py:obj:`~.cudaGraphKernelNodeCopyAttributes`. Graphs containing one - #: or more device-updatable nodes also do not allow multiple - #: instantiation, and neither the graph nor its instantiated version - #: can be passed to :py:obj:`~.cudaGraphExecUpdate`. - #: If a graph contains device-updatable nodes and updates those nodes - #: from the device from within the graph, the graph must be uploaded - #: with :py:obj:`~.cuGraphUpload` before it is launched. For such a - #: graph, if host-side executable graph updates are made to the device- - #: updatable nodes, the graph must be uploaded before it is launched - #: again. - cudaLaunchAttributeDeviceUpdatableKernelNode = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeDeviceUpdatableKernelNode{{endif}} + cudaLaunchAttributeDeviceUpdatableKernelNode = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeDeviceUpdatableKernelNode, + 'Valid for graph nodes, launches. This attribute is graphs-only, and passing\n' + 'it to a launch in a non-capturing stream will result in an error.\n' + ' :cudaLaunchAttributeValue::deviceUpdatableKernelNode::deviceUpdatable can\n' + 'only be set to 0 or 1. Setting the field to 1 indicates that the\n' + 'corresponding kernel node should be device-updatable. On success, a handle\n' + 'will be returned via\n' + ':py:obj:`~.cudaLaunchAttributeValue`::deviceUpdatableKernelNode::devNode\n' + 'which can be passed to the various device-side update functions to update\n' + "the node's kernel parameters from within another kernel. For more\n" + 'information on the types of device updates that can be made, as well as the\n' + 'relevant limitations thereof, see\n' + ':py:obj:`~.cudaGraphKernelNodeUpdatesApply`.\n' + ' Nodes which are device-updatable have additional restrictions compared to\n' + 'regular kernel nodes. Firstly, device-updatable nodes cannot be removed\n' + 'from their graph via :py:obj:`~.cudaGraphDestroyNode`. Additionally, once\n' + 'opted-in to this functionality, a node cannot opt out, and any attempt to\n' + 'set the deviceUpdatable attribute to 0 will result in an error. Device-\n' + 'updatable kernel nodes also cannot have their attributes copied to/from\n' + 'another kernel node via :py:obj:`~.cudaGraphKernelNodeCopyAttributes`.\n' + 'Graphs containing one or more device-updatable nodes also do not allow\n' + 'multiple instantiation, and neither the graph nor its instantiated version\n' + 'can be passed to :py:obj:`~.cudaGraphExecUpdate`.\n' + ' If a graph contains device-updatable nodes and updates those nodes from\n' + 'the device from within the graph, the graph must be uploaded with\n' + ':py:obj:`~.cuGraphUpload` before it is launched. For such a graph, if host-\n' + 'side executable graph updates are made to the device-updatable nodes, the\n' + 'graph must be uploaded before it is launched again.\n' + ){{endif}} {{if 'cudaLaunchAttributePreferredSharedMemoryCarveout' in found_values}} - #: Valid for launches. On devices where the L1 cache and shared memory - #: use the same hardware resources, setting - #: :py:obj:`~.cudaLaunchAttributeValue.sharedMemCarveout` to a - #: percentage between 0-100 signals sets the shared memory carveout - #: preference in percent of the total shared memory for that kernel - #: launch. This attribute takes precedence over - #: :py:obj:`~.cudaFuncAttributePreferredSharedMemoryCarveout`. This is - #: only a hint, and the driver can choose a different configuration if - #: required for the launch. - cudaLaunchAttributePreferredSharedMemoryCarveout = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePreferredSharedMemoryCarveout{{endif}} + cudaLaunchAttributePreferredSharedMemoryCarveout = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePreferredSharedMemoryCarveout, + 'Valid for launches. On devices where the L1 cache and shared memory use the\n' + 'same hardware resources, setting\n' + ':py:obj:`~.cudaLaunchAttributeValue.sharedMemCarveout` to a percentage\n' + 'between 0-100 signals sets the shared memory carveout preference in percent\n' + 'of the total shared memory for that kernel launch. This attribute takes\n' + 'precedence over :py:obj:`~.cudaFuncAttributePreferredSharedMemoryCarveout`.\n' + 'This is only a hint, and the driver can choose a different configuration if\n' + 'required for the launch.\n' + ){{endif}} {{if 'cudaLaunchAttributeNvlinkUtilCentricScheduling' in found_values}} - #: Valid for streams, graph nodes, launches. This attribute is a hint - #: to the CUDA runtime that the launch should attempt to make the - #: kernel maximize its NVLINK utilization. - #: - #: When possible to honor this hint, CUDA will assume each block in - #: the grid launch will carry out an even amount of NVLINK traffic, and - #: make a best-effort attempt to adjust the kernel launch based on that - #: assumption. - #: This attribute is a hint only. CUDA makes no functional or - #: performance guarantee. Its applicability can be affected by many - #: different factors, including driver version (i.e. CUDA doesn't - #: guarantee the performance characteristics will be maintained between - #: driver versions or a driver update could alter or regress previously - #: observed perf characteristics.) It also doesn't guarantee a - #: successful result, i.e. applying the attribute may not improve the - #: performance of either the targeted kernel or the encapsulating - #: application. - #: Valid values for - #: :py:obj:`~.cudaLaunchAttributeValue.nvlinkUtilCentricScheduling` are - #: 0 (disabled) and 1 (enabled). - cudaLaunchAttributeNvlinkUtilCentricScheduling = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeNvlinkUtilCentricScheduling{{endif}} - -_dict_cudaLaunchAttributeID = dict(((int(v), v) for k, v in cudaLaunchAttributeID.__members__.items())) + cudaLaunchAttributeNvlinkUtilCentricScheduling = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeNvlinkUtilCentricScheduling, + 'Valid for streams, graph nodes, launches. This attribute is a hint to the\n' + 'CUDA runtime that the launch should attempt to make the kernel maximize its\n' + 'NVLINK utilization.\n' + ' When possible to honor this hint, CUDA will assume each block in the grid\n' + 'launch will carry out an even amount of NVLINK traffic, and make a best-\n' + 'effort attempt to adjust the kernel launch based on that assumption.\n' + ' This attribute is a hint only. CUDA makes no functional or performance\n' + 'guarantee. Its applicability can be affected by many different factors,\n' + "including driver version (i.e. CUDA doesn't guarantee the performance\n" + 'characteristics will be maintained between driver versions or a driver\n' + 'update could alter or regress previously observed perf characteristics.) It\n' + "also doesn't guarantee a successful result, i.e. applying the attribute may\n" + 'not improve the performance of either the targeted kernel or the\n' + 'encapsulating application.\n' + ' Valid values for\n' + ':py:obj:`~.cudaLaunchAttributeValue.nvlinkUtilCentricScheduling` are 0\n' + '(disabled) and 1 (enabled).\n' + ){{endif}} + {{endif}} {{if 'cudaAsyncNotificationType_enum' in found_types}} -class cudaAsyncNotificationType(IntEnum): +class cudaAsyncNotificationType(_FastEnum): """ Types of async notification that can occur """ {{if 'cudaAsyncNotificationTypeOverBudget' in found_values}} - #: Sent when the process has exceeded its device memory budget - cudaAsyncNotificationTypeOverBudget = cyruntime.cudaAsyncNotificationType_enum.cudaAsyncNotificationTypeOverBudget{{endif}} + cudaAsyncNotificationTypeOverBudget = ( + cyruntime.cudaAsyncNotificationType_enum.cudaAsyncNotificationTypeOverBudget, + 'Sent when the process has exceeded its device memory budget\n' + ){{endif}} -_dict_cudaAsyncNotificationType = dict(((int(v), v) for k, v in cudaAsyncNotificationType.__members__.items())) {{endif}} {{if 'CUDAlogLevel_enum' in found_types}} -class cudaLogLevel(IntEnum): +class cudaLogLevel(_FastEnum): """ """ @@ -1493,11 +1765,10 @@ class cudaLogLevel(IntEnum): {{if 'cudaLogLevelWarning' in found_values}} cudaLogLevelWarning = cyruntime.CUDAlogLevel_enum.cudaLogLevelWarning{{endif}} -_dict_cudaLogLevel = dict(((int(v), v) for k, v in cudaLogLevel.__members__.items())) {{endif}} {{if 'cudaDataType_t' in found_types}} -class cudaDataType(IntEnum): +class cudaDataType(_FastEnum): """""" {{if 'CUDA_R_32F' in found_values}} CUDA_R_32F = cyruntime.cudaDataType_t.CUDA_R_32F{{endif}} @@ -1570,11 +1841,10 @@ class cudaDataType(IntEnum): {{if 'CUDA_R_4F_E2M1' in found_values}} CUDA_R_4F_E2M1 = cyruntime.cudaDataType_t.CUDA_R_4F_E2M1{{endif}} -_dict_cudaDataType = dict(((int(v), v) for k, v in cudaDataType.__members__.items())) {{endif}} {{if 'cudaEmulationStrategy_t' in found_types}} -class cudaEmulationStrategy(IntEnum): +class cudaEmulationStrategy(_FastEnum): """""" {{if 'CUDA_EMULATION_STRATEGY_DEFAULT' in found_values}} CUDA_EMULATION_STRATEGY_DEFAULT = cyruntime.cudaEmulationStrategy_t.CUDA_EMULATION_STRATEGY_DEFAULT{{endif}} @@ -1583,22 +1853,20 @@ class cudaEmulationStrategy(IntEnum): {{if 'CUDA_EMULATION_STRATEGY_EAGER' in found_values}} CUDA_EMULATION_STRATEGY_EAGER = cyruntime.cudaEmulationStrategy_t.CUDA_EMULATION_STRATEGY_EAGER{{endif}} -_dict_cudaEmulationStrategy = dict(((int(v), v) for k, v in cudaEmulationStrategy.__members__.items())) {{endif}} {{if 'cudaEmulationMantissaControl_t' in found_types}} -class cudaEmulationMantissaControl(IntEnum): +class cudaEmulationMantissaControl(_FastEnum): """""" {{if 'CUDA_EMULATION_MANTISSA_CONTROL_DYNAMIC' in found_values}} CUDA_EMULATION_MANTISSA_CONTROL_DYNAMIC = cyruntime.cudaEmulationMantissaControl_t.CUDA_EMULATION_MANTISSA_CONTROL_DYNAMIC{{endif}} {{if 'CUDA_EMULATION_MANTISSA_CONTROL_FIXED' in found_values}} CUDA_EMULATION_MANTISSA_CONTROL_FIXED = cyruntime.cudaEmulationMantissaControl_t.CUDA_EMULATION_MANTISSA_CONTROL_FIXED{{endif}} -_dict_cudaEmulationMantissaControl = dict(((int(v), v) for k, v in cudaEmulationMantissaControl.__members__.items())) {{endif}} {{if 'cudaEmulationSpecialValuesSupport_t' in found_types}} -class cudaEmulationSpecialValuesSupport(IntEnum): +class cudaEmulationSpecialValuesSupport(_FastEnum): """""" {{if 'CUDA_EMULATION_SPECIAL_VALUES_SUPPORT_NONE' in found_values}} CUDA_EMULATION_SPECIAL_VALUES_SUPPORT_NONE = cyruntime.cudaEmulationSpecialValuesSupport_t.CUDA_EMULATION_SPECIAL_VALUES_SUPPORT_NONE{{endif}} @@ -1609,11 +1877,10 @@ class cudaEmulationSpecialValuesSupport(IntEnum): {{if 'CUDA_EMULATION_SPECIAL_VALUES_SUPPORT_DEFAULT' in found_values}} CUDA_EMULATION_SPECIAL_VALUES_SUPPORT_DEFAULT = cyruntime.cudaEmulationSpecialValuesSupport_t.CUDA_EMULATION_SPECIAL_VALUES_SUPPORT_DEFAULT{{endif}} -_dict_cudaEmulationSpecialValuesSupport = dict(((int(v), v) for k, v in cudaEmulationSpecialValuesSupport.__members__.items())) {{endif}} {{if 'libraryPropertyType_t' in found_types}} -class libraryPropertyType(IntEnum): +class libraryPropertyType(_FastEnum): """""" {{if 'MAJOR_VERSION' in found_values}} MAJOR_VERSION = cyruntime.libraryPropertyType_t.MAJOR_VERSION{{endif}} @@ -1622,28 +1889,30 @@ class libraryPropertyType(IntEnum): {{if 'PATCH_LEVEL' in found_values}} PATCH_LEVEL = cyruntime.libraryPropertyType_t.PATCH_LEVEL{{endif}} -_dict_libraryPropertyType = dict(((int(v), v) for k, v in libraryPropertyType.__members__.items())) {{endif}} {{if True}} -class cudaEglFrameType(IntEnum): +class cudaEglFrameType(_FastEnum): """ CUDA EglFrame type - array or pointer """ {{if True}} - #: Frame type CUDA array - cudaEglFrameTypeArray = cyruntime.cudaEglFrameType_enum.cudaEglFrameTypeArray{{endif}} + cudaEglFrameTypeArray = ( + cyruntime.cudaEglFrameType_enum.cudaEglFrameTypeArray, + 'Frame type CUDA array\n' + ){{endif}} {{if True}} - #: Frame type CUDA pointer - cudaEglFrameTypePitch = cyruntime.cudaEglFrameType_enum.cudaEglFrameTypePitch{{endif}} + cudaEglFrameTypePitch = ( + cyruntime.cudaEglFrameType_enum.cudaEglFrameTypePitch, + 'Frame type CUDA pointer\n' + ){{endif}} -_dict_cudaEglFrameType = dict(((int(v), v) for k, v in cudaEglFrameType.__members__.items())) {{endif}} {{if True}} -class cudaEglResourceLocationFlags(IntEnum): +class cudaEglResourceLocationFlags(_FastEnum): """ Resource location flags- sysmem or vidmem For CUDA context on iGPU, since video and system memory are equivalent - these flags @@ -1659,825 +1928,1115 @@ class cudaEglResourceLocationFlags(IntEnum): """ {{if True}} - #: Resource location sysmem - cudaEglResourceLocationSysmem = cyruntime.cudaEglResourceLocationFlags_enum.cudaEglResourceLocationSysmem{{endif}} + cudaEglResourceLocationSysmem = ( + cyruntime.cudaEglResourceLocationFlags_enum.cudaEglResourceLocationSysmem, + 'Resource location sysmem\n' + ){{endif}} {{if True}} - #: Resource location vidmem - cudaEglResourceLocationVidmem = cyruntime.cudaEglResourceLocationFlags_enum.cudaEglResourceLocationVidmem{{endif}} + cudaEglResourceLocationVidmem = ( + cyruntime.cudaEglResourceLocationFlags_enum.cudaEglResourceLocationVidmem, + 'Resource location vidmem\n' + ){{endif}} -_dict_cudaEglResourceLocationFlags = dict(((int(v), v) for k, v in cudaEglResourceLocationFlags.__members__.items())) {{endif}} {{if True}} -class cudaEglColorFormat(IntEnum): +class cudaEglColorFormat(_FastEnum): """ CUDA EGL Color Format - The different planar and multiplanar formats currently supported for CUDA_EGL interops. """ {{if True}} - #: Y, U, V in three surfaces, each in a separate surface, U/V width = - #: 1/2 Y width, U/V height = 1/2 Y height. - cudaEglColorFormatYUV420Planar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV420Planar{{endif}} + cudaEglColorFormatYUV420Planar = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV420Planar, + 'Y, U, V in three surfaces, each in a separate surface, U/V width = 1/2 Y\n' + 'width, U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Y, UV in two surfaces (UV as one surface) with VU byte ordering, - #: width, height ratio same as YUV420Planar. - cudaEglColorFormatYUV420SemiPlanar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV420SemiPlanar{{endif}} + cudaEglColorFormatYUV420SemiPlanar = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV420SemiPlanar, + 'Y, UV in two surfaces (UV as one surface) with VU byte ordering, width,\n' + 'height ratio same as YUV420Planar.\n' + ){{endif}} {{if True}} - #: Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V - #: height = Y height. - cudaEglColorFormatYUV422Planar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV422Planar{{endif}} + cudaEglColorFormatYUV422Planar = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV422Planar, + 'Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V height = Y\n' + 'height.\n' + ){{endif}} {{if True}} - #: Y, UV in two surfaces with VU byte ordering, width, height ratio - #: same as YUV422Planar. - cudaEglColorFormatYUV422SemiPlanar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV422SemiPlanar{{endif}} + cudaEglColorFormatYUV422SemiPlanar = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV422SemiPlanar, + 'Y, UV in two surfaces with VU byte ordering, width, height ratio same as\n' + 'YUV422Planar.\n' + ){{endif}} {{if True}} - #: R/G/B/A four channels in one surface with BGRA byte ordering. - cudaEglColorFormatARGB = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatARGB{{endif}} + cudaEglColorFormatARGB = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatARGB, + 'R/G/B/A four channels in one surface with BGRA byte ordering.\n' + ){{endif}} {{if True}} - #: R/G/B/A four channels in one surface with ABGR byte ordering. - cudaEglColorFormatRGBA = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatRGBA{{endif}} + cudaEglColorFormatRGBA = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatRGBA, + 'R/G/B/A four channels in one surface with ABGR byte ordering.\n' + ){{endif}} {{if True}} - #: single luminance channel in one surface. - cudaEglColorFormatL = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatL{{endif}} + cudaEglColorFormatL = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatL, + 'single luminance channel in one surface.\n' + ){{endif}} {{if True}} - #: single color channel in one surface. - cudaEglColorFormatR = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatR{{endif}} + cudaEglColorFormatR = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatR, + 'single color channel in one surface.\n' + ){{endif}} {{if True}} - #: Y, U, V in three surfaces, each in a separate surface, U/V width = Y - #: width, U/V height = Y height. - cudaEglColorFormatYUV444Planar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV444Planar{{endif}} + cudaEglColorFormatYUV444Planar = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV444Planar, + 'Y, U, V in three surfaces, each in a separate surface, U/V width = Y width,\n' + 'U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Y, UV in two surfaces (UV as one surface) with VU byte ordering, - #: width, height ratio same as YUV444Planar. - cudaEglColorFormatYUV444SemiPlanar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV444SemiPlanar{{endif}} + cudaEglColorFormatYUV444SemiPlanar = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV444SemiPlanar, + 'Y, UV in two surfaces (UV as one surface) with VU byte ordering, width,\n' + 'height ratio same as YUV444Planar.\n' + ){{endif}} {{if True}} - #: Y, U, V in one surface, interleaved as UYVY in one channel. - cudaEglColorFormatYUYV422 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUYV422{{endif}} + cudaEglColorFormatYUYV422 = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUYV422, + 'Y, U, V in one surface, interleaved as UYVY in one channel.\n' + ){{endif}} {{if True}} - #: Y, U, V in one surface, interleaved as YUYV in one channel. - cudaEglColorFormatUYVY422 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatUYVY422{{endif}} + cudaEglColorFormatUYVY422 = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatUYVY422, + 'Y, U, V in one surface, interleaved as YUYV in one channel.\n' + ){{endif}} {{if True}} - #: R/G/B/A four channels in one surface with RGBA byte ordering. - cudaEglColorFormatABGR = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatABGR{{endif}} + cudaEglColorFormatABGR = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatABGR, + 'R/G/B/A four channels in one surface with RGBA byte ordering.\n' + ){{endif}} {{if True}} - #: R/G/B/A four channels in one surface with ARGB byte ordering. - cudaEglColorFormatBGRA = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBGRA{{endif}} + cudaEglColorFormatBGRA = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBGRA, + 'R/G/B/A four channels in one surface with ARGB byte ordering.\n' + ){{endif}} {{if True}} - #: Alpha color format - one channel in one surface. - cudaEglColorFormatA = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatA{{endif}} + cudaEglColorFormatA = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatA, + 'Alpha color format - one channel in one surface.\n' + ){{endif}} {{if True}} - #: R/G color format - two channels in one surface with GR byte ordering - cudaEglColorFormatRG = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatRG{{endif}} + cudaEglColorFormatRG = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatRG, + 'R/G color format - two channels in one surface with GR byte ordering\n' + ){{endif}} {{if True}} - #: Y, U, V, A four channels in one surface, interleaved as VUYA. - cudaEglColorFormatAYUV = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatAYUV{{endif}} + cudaEglColorFormatAYUV = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatAYUV, + 'Y, U, V, A four channels in one surface, interleaved as VUYA.\n' + ){{endif}} {{if True}} - #: Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V - #: width = Y width, U/V height = Y height. - cudaEglColorFormatYVU444SemiPlanar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU444SemiPlanar{{endif}} + cudaEglColorFormatYVU444SemiPlanar = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU444SemiPlanar, + 'Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width\n' + '= Y width, U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V - #: width = 1/2 Y width, U/V height = Y height. - cudaEglColorFormatYVU422SemiPlanar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU422SemiPlanar{{endif}} + cudaEglColorFormatYVU422SemiPlanar = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU422SemiPlanar, + 'Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width\n' + '= 1/2 Y width, U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V - #: width = 1/2 Y width, U/V height = 1/2 Y height. - cudaEglColorFormatYVU420SemiPlanar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU420SemiPlanar{{endif}} + cudaEglColorFormatYVU420SemiPlanar = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU420SemiPlanar, + 'Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width\n' + '= 1/2 Y width, U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Y10, V10U10 in two surfaces (VU as one surface) with UV byte - #: ordering, U/V width = Y width, U/V height = Y height. - cudaEglColorFormatY10V10U10_444SemiPlanar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_444SemiPlanar{{endif}} + cudaEglColorFormatY10V10U10_444SemiPlanar = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_444SemiPlanar, + 'Y10, V10U10 in two surfaces (VU as one surface) with UV byte ordering, U/V\n' + 'width = Y width, U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Y10, V10U10 in two surfaces (VU as one surface) with UV byte - #: ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. - cudaEglColorFormatY10V10U10_420SemiPlanar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_420SemiPlanar{{endif}} + cudaEglColorFormatY10V10U10_420SemiPlanar = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_420SemiPlanar, + 'Y10, V10U10 in two surfaces (VU as one surface) with UV byte ordering, U/V\n' + 'width = 1/2 Y width, U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Y12, V12U12 in two surfaces (VU as one surface) with UV byte - #: ordering, U/V width = Y width, U/V height = Y height. - cudaEglColorFormatY12V12U12_444SemiPlanar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY12V12U12_444SemiPlanar{{endif}} + cudaEglColorFormatY12V12U12_444SemiPlanar = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY12V12U12_444SemiPlanar, + 'Y12, V12U12 in two surfaces (VU as one surface) with UV byte ordering, U/V\n' + 'width = Y width, U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Y12, V12U12 in two surfaces (VU as one surface) with UV byte - #: ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. - cudaEglColorFormatY12V12U12_420SemiPlanar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY12V12U12_420SemiPlanar{{endif}} + cudaEglColorFormatY12V12U12_420SemiPlanar = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY12V12U12_420SemiPlanar, + 'Y12, V12U12 in two surfaces (VU as one surface) with UV byte ordering, U/V\n' + 'width = 1/2 Y width, U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y, U, V in one surface, interleaved as YVYU in one - #: channel. - cudaEglColorFormatVYUY_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatVYUY_ER{{endif}} + cudaEglColorFormatVYUY_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatVYUY_ER, + 'Extended Range Y, U, V in one surface, interleaved as YVYU in one channel.\n' + ){{endif}} {{if True}} - #: Extended Range Y, U, V in one surface, interleaved as YUYV in one - #: channel. - cudaEglColorFormatUYVY_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatUYVY_ER{{endif}} + cudaEglColorFormatUYVY_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatUYVY_ER, + 'Extended Range Y, U, V in one surface, interleaved as YUYV in one channel.\n' + ){{endif}} {{if True}} - #: Extended Range Y, U, V in one surface, interleaved as UYVY in one - #: channel. - cudaEglColorFormatYUYV_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUYV_ER{{endif}} + cudaEglColorFormatYUYV_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUYV_ER, + 'Extended Range Y, U, V in one surface, interleaved as UYVY in one channel.\n' + ){{endif}} {{if True}} - #: Extended Range Y, U, V in one surface, interleaved as VYUY in one - #: channel. - cudaEglColorFormatYVYU_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVYU_ER{{endif}} + cudaEglColorFormatYVYU_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVYU_ER, + 'Extended Range Y, U, V in one surface, interleaved as VYUY in one channel.\n' + ){{endif}} {{if True}} - #: Extended Range Y, U, V, A four channels in one surface, interleaved - #: as AVUY. - cudaEglColorFormatYUVA_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUVA_ER{{endif}} + cudaEglColorFormatYUVA_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUVA_ER, + 'Extended Range Y, U, V, A four channels in one surface, interleaved as\n' + 'AVUY.\n' + ){{endif}} {{if True}} - #: Extended Range Y, U, V, A four channels in one surface, interleaved - #: as VUYA. - cudaEglColorFormatAYUV_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatAYUV_ER{{endif}} + cudaEglColorFormatAYUV_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatAYUV_ER, + 'Extended Range Y, U, V, A four channels in one surface, interleaved as\n' + 'VUYA.\n' + ){{endif}} {{if True}} - #: Extended Range Y, U, V in three surfaces, U/V width = Y width, U/V - #: height = Y height. - cudaEglColorFormatYUV444Planar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV444Planar_ER{{endif}} + cudaEglColorFormatYUV444Planar_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV444Planar_ER, + 'Extended Range Y, U, V in three surfaces, U/V width = Y width, U/V height =\n' + 'Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y, U, V in three surfaces, U/V width = 1/2 Y width, - #: U/V height = Y height. - cudaEglColorFormatYUV422Planar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV422Planar_ER{{endif}} + cudaEglColorFormatYUV422Planar_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV422Planar_ER, + 'Extended Range Y, U, V in three surfaces, U/V width = 1/2 Y width, U/V\n' + 'height = Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y, U, V in three surfaces, U/V width = 1/2 Y width, - #: U/V height = 1/2 Y height. - cudaEglColorFormatYUV420Planar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV420Planar_ER{{endif}} + cudaEglColorFormatYUV420Planar_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV420Planar_ER, + 'Extended Range Y, U, V in three surfaces, U/V width = 1/2 Y width, U/V\n' + 'height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y, UV in two surfaces (UV as one surface) with VU - #: byte ordering, U/V width = Y width, U/V height = Y height. - cudaEglColorFormatYUV444SemiPlanar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV444SemiPlanar_ER{{endif}} + cudaEglColorFormatYUV444SemiPlanar_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV444SemiPlanar_ER, + 'Extended Range Y, UV in two surfaces (UV as one surface) with VU byte\n' + 'ordering, U/V width = Y width, U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y, UV in two surfaces (UV as one surface) with VU - #: byte ordering, U/V width = 1/2 Y width, U/V height = Y height. - cudaEglColorFormatYUV422SemiPlanar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV422SemiPlanar_ER{{endif}} + cudaEglColorFormatYUV422SemiPlanar_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV422SemiPlanar_ER, + 'Extended Range Y, UV in two surfaces (UV as one surface) with VU byte\n' + 'ordering, U/V width = 1/2 Y width, U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y, UV in two surfaces (UV as one surface) with VU - #: byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. - cudaEglColorFormatYUV420SemiPlanar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV420SemiPlanar_ER{{endif}} + cudaEglColorFormatYUV420SemiPlanar_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV420SemiPlanar_ER, + 'Extended Range Y, UV in two surfaces (UV as one surface) with VU byte\n' + 'ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y, V, U in three surfaces, U/V width = Y width, U/V - #: height = Y height. - cudaEglColorFormatYVU444Planar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU444Planar_ER{{endif}} + cudaEglColorFormatYVU444Planar_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU444Planar_ER, + 'Extended Range Y, V, U in three surfaces, U/V width = Y width, U/V height =\n' + 'Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y, V, U in three surfaces, U/V width = 1/2 Y width, - #: U/V height = Y height. - cudaEglColorFormatYVU422Planar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU422Planar_ER{{endif}} + cudaEglColorFormatYVU422Planar_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU422Planar_ER, + 'Extended Range Y, V, U in three surfaces, U/V width = 1/2 Y width, U/V\n' + 'height = Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y, V, U in three surfaces, U/V width = 1/2 Y width, - #: U/V height = 1/2 Y height. - cudaEglColorFormatYVU420Planar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU420Planar_ER{{endif}} + cudaEglColorFormatYVU420Planar_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU420Planar_ER, + 'Extended Range Y, V, U in three surfaces, U/V width = 1/2 Y width, U/V\n' + 'height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y, VU in two surfaces (VU as one surface) with UV - #: byte ordering, U/V width = Y width, U/V height = Y height. - cudaEglColorFormatYVU444SemiPlanar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU444SemiPlanar_ER{{endif}} + cudaEglColorFormatYVU444SemiPlanar_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU444SemiPlanar_ER, + 'Extended Range Y, VU in two surfaces (VU as one surface) with UV byte\n' + 'ordering, U/V width = Y width, U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y, VU in two surfaces (VU as one surface) with UV - #: byte ordering, U/V width = 1/2 Y width, U/V height = Y height. - cudaEglColorFormatYVU422SemiPlanar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU422SemiPlanar_ER{{endif}} + cudaEglColorFormatYVU422SemiPlanar_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU422SemiPlanar_ER, + 'Extended Range Y, VU in two surfaces (VU as one surface) with UV byte\n' + 'ordering, U/V width = 1/2 Y width, U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y, VU in two surfaces (VU as one surface) with UV - #: byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height. - cudaEglColorFormatYVU420SemiPlanar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU420SemiPlanar_ER{{endif}} + cudaEglColorFormatYVU420SemiPlanar_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU420SemiPlanar_ER, + 'Extended Range Y, VU in two surfaces (VU as one surface) with UV byte\n' + 'ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Bayer format - one channel in one surface with interleaved RGGB - #: ordering. - cudaEglColorFormatBayerRGGB = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerRGGB{{endif}} + cudaEglColorFormatBayerRGGB = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerRGGB, + 'Bayer format - one channel in one surface with interleaved RGGB ordering.\n' + ){{endif}} {{if True}} - #: Bayer format - one channel in one surface with interleaved BGGR - #: ordering. - cudaEglColorFormatBayerBGGR = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerBGGR{{endif}} + cudaEglColorFormatBayerBGGR = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerBGGR, + 'Bayer format - one channel in one surface with interleaved BGGR ordering.\n' + ){{endif}} {{if True}} - #: Bayer format - one channel in one surface with interleaved GRBG - #: ordering. - cudaEglColorFormatBayerGRBG = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerGRBG{{endif}} + cudaEglColorFormatBayerGRBG = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerGRBG, + 'Bayer format - one channel in one surface with interleaved GRBG ordering.\n' + ){{endif}} {{if True}} - #: Bayer format - one channel in one surface with interleaved GBRG - #: ordering. - cudaEglColorFormatBayerGBRG = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerGBRG{{endif}} + cudaEglColorFormatBayerGBRG = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerGBRG, + 'Bayer format - one channel in one surface with interleaved GBRG ordering.\n' + ){{endif}} {{if True}} - #: Bayer10 format - one channel in one surface with interleaved RGGB - #: ordering. Out of 16 bits, 10 bits used 6 bits No-op. - cudaEglColorFormatBayer10RGGB = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer10RGGB{{endif}} + cudaEglColorFormatBayer10RGGB = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer10RGGB, + 'Bayer10 format - one channel in one surface with interleaved RGGB ordering.\n' + 'Out of 16 bits, 10 bits used 6 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer10 format - one channel in one surface with interleaved BGGR - #: ordering. Out of 16 bits, 10 bits used 6 bits No-op. - cudaEglColorFormatBayer10BGGR = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer10BGGR{{endif}} + cudaEglColorFormatBayer10BGGR = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer10BGGR, + 'Bayer10 format - one channel in one surface with interleaved BGGR ordering.\n' + 'Out of 16 bits, 10 bits used 6 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer10 format - one channel in one surface with interleaved GRBG - #: ordering. Out of 16 bits, 10 bits used 6 bits No-op. - cudaEglColorFormatBayer10GRBG = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer10GRBG{{endif}} + cudaEglColorFormatBayer10GRBG = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer10GRBG, + 'Bayer10 format - one channel in one surface with interleaved GRBG ordering.\n' + 'Out of 16 bits, 10 bits used 6 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer10 format - one channel in one surface with interleaved GBRG - #: ordering. Out of 16 bits, 10 bits used 6 bits No-op. - cudaEglColorFormatBayer10GBRG = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer10GBRG{{endif}} + cudaEglColorFormatBayer10GBRG = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer10GBRG, + 'Bayer10 format - one channel in one surface with interleaved GBRG ordering.\n' + 'Out of 16 bits, 10 bits used 6 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer12 format - one channel in one surface with interleaved RGGB - #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. - cudaEglColorFormatBayer12RGGB = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12RGGB{{endif}} + cudaEglColorFormatBayer12RGGB = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12RGGB, + 'Bayer12 format - one channel in one surface with interleaved RGGB ordering.\n' + 'Out of 16 bits, 12 bits used 4 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer12 format - one channel in one surface with interleaved BGGR - #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. - cudaEglColorFormatBayer12BGGR = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12BGGR{{endif}} + cudaEglColorFormatBayer12BGGR = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12BGGR, + 'Bayer12 format - one channel in one surface with interleaved BGGR ordering.\n' + 'Out of 16 bits, 12 bits used 4 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer12 format - one channel in one surface with interleaved GRBG - #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. - cudaEglColorFormatBayer12GRBG = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12GRBG{{endif}} + cudaEglColorFormatBayer12GRBG = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12GRBG, + 'Bayer12 format - one channel in one surface with interleaved GRBG ordering.\n' + 'Out of 16 bits, 12 bits used 4 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer12 format - one channel in one surface with interleaved GBRG - #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. - cudaEglColorFormatBayer12GBRG = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12GBRG{{endif}} + cudaEglColorFormatBayer12GBRG = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12GBRG, + 'Bayer12 format - one channel in one surface with interleaved GBRG ordering.\n' + 'Out of 16 bits, 12 bits used 4 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer14 format - one channel in one surface with interleaved RGGB - #: ordering. Out of 16 bits, 14 bits used 2 bits No-op. - cudaEglColorFormatBayer14RGGB = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer14RGGB{{endif}} + cudaEglColorFormatBayer14RGGB = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer14RGGB, + 'Bayer14 format - one channel in one surface with interleaved RGGB ordering.\n' + 'Out of 16 bits, 14 bits used 2 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer14 format - one channel in one surface with interleaved BGGR - #: ordering. Out of 16 bits, 14 bits used 2 bits No-op. - cudaEglColorFormatBayer14BGGR = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer14BGGR{{endif}} + cudaEglColorFormatBayer14BGGR = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer14BGGR, + 'Bayer14 format - one channel in one surface with interleaved BGGR ordering.\n' + 'Out of 16 bits, 14 bits used 2 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer14 format - one channel in one surface with interleaved GRBG - #: ordering. Out of 16 bits, 14 bits used 2 bits No-op. - cudaEglColorFormatBayer14GRBG = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer14GRBG{{endif}} + cudaEglColorFormatBayer14GRBG = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer14GRBG, + 'Bayer14 format - one channel in one surface with interleaved GRBG ordering.\n' + 'Out of 16 bits, 14 bits used 2 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer14 format - one channel in one surface with interleaved GBRG - #: ordering. Out of 16 bits, 14 bits used 2 bits No-op. - cudaEglColorFormatBayer14GBRG = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer14GBRG{{endif}} + cudaEglColorFormatBayer14GBRG = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer14GBRG, + 'Bayer14 format - one channel in one surface with interleaved GBRG ordering.\n' + 'Out of 16 bits, 14 bits used 2 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer20 format - one channel in one surface with interleaved RGGB - #: ordering. Out of 32 bits, 20 bits used 12 bits No-op. - cudaEglColorFormatBayer20RGGB = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer20RGGB{{endif}} + cudaEglColorFormatBayer20RGGB = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer20RGGB, + 'Bayer20 format - one channel in one surface with interleaved RGGB ordering.\n' + 'Out of 32 bits, 20 bits used 12 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer20 format - one channel in one surface with interleaved BGGR - #: ordering. Out of 32 bits, 20 bits used 12 bits No-op. - cudaEglColorFormatBayer20BGGR = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer20BGGR{{endif}} + cudaEglColorFormatBayer20BGGR = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer20BGGR, + 'Bayer20 format - one channel in one surface with interleaved BGGR ordering.\n' + 'Out of 32 bits, 20 bits used 12 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer20 format - one channel in one surface with interleaved GRBG - #: ordering. Out of 32 bits, 20 bits used 12 bits No-op. - cudaEglColorFormatBayer20GRBG = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer20GRBG{{endif}} + cudaEglColorFormatBayer20GRBG = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer20GRBG, + 'Bayer20 format - one channel in one surface with interleaved GRBG ordering.\n' + 'Out of 32 bits, 20 bits used 12 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer20 format - one channel in one surface with interleaved GBRG - #: ordering. Out of 32 bits, 20 bits used 12 bits No-op. - cudaEglColorFormatBayer20GBRG = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer20GBRG{{endif}} + cudaEglColorFormatBayer20GBRG = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer20GBRG, + 'Bayer20 format - one channel in one surface with interleaved GBRG ordering.\n' + 'Out of 32 bits, 20 bits used 12 bits No-op.\n' + ){{endif}} {{if True}} - #: Y, V, U in three surfaces, each in a separate surface, U/V width = Y - #: width, U/V height = Y height. - cudaEglColorFormatYVU444Planar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU444Planar{{endif}} + cudaEglColorFormatYVU444Planar = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU444Planar, + 'Y, V, U in three surfaces, each in a separate surface, U/V width = Y width,\n' + 'U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Y, V, U in three surfaces, each in a separate surface, U/V width = - #: 1/2 Y width, U/V height = Y height. - cudaEglColorFormatYVU422Planar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU422Planar{{endif}} + cudaEglColorFormatYVU422Planar = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU422Planar, + 'Y, V, U in three surfaces, each in a separate surface, U/V width = 1/2 Y\n' + 'width, U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Y, V, U in three surfaces, each in a separate surface, U/V width = - #: 1/2 Y width, U/V height = 1/2 Y height. - cudaEglColorFormatYVU420Planar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU420Planar{{endif}} + cudaEglColorFormatYVU420Planar = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU420Planar, + 'Y, V, U in three surfaces, each in a separate surface, U/V width = 1/2 Y\n' + 'width, U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Nvidia proprietary Bayer ISP format - one channel in one surface - #: with interleaved RGGB ordering and mapped to opaque integer - #: datatype. - cudaEglColorFormatBayerIspRGGB = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerIspRGGB{{endif}} + cudaEglColorFormatBayerIspRGGB = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerIspRGGB, + 'Nvidia proprietary Bayer ISP format - one channel in one surface with\n' + 'interleaved RGGB ordering and mapped to opaque integer datatype.\n' + ){{endif}} {{if True}} - #: Nvidia proprietary Bayer ISP format - one channel in one surface - #: with interleaved BGGR ordering and mapped to opaque integer - #: datatype. - cudaEglColorFormatBayerIspBGGR = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerIspBGGR{{endif}} + cudaEglColorFormatBayerIspBGGR = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerIspBGGR, + 'Nvidia proprietary Bayer ISP format - one channel in one surface with\n' + 'interleaved BGGR ordering and mapped to opaque integer datatype.\n' + ){{endif}} {{if True}} - #: Nvidia proprietary Bayer ISP format - one channel in one surface - #: with interleaved GRBG ordering and mapped to opaque integer - #: datatype. - cudaEglColorFormatBayerIspGRBG = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerIspGRBG{{endif}} + cudaEglColorFormatBayerIspGRBG = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerIspGRBG, + 'Nvidia proprietary Bayer ISP format - one channel in one surface with\n' + 'interleaved GRBG ordering and mapped to opaque integer datatype.\n' + ){{endif}} {{if True}} - #: Nvidia proprietary Bayer ISP format - one channel in one surface - #: with interleaved GBRG ordering and mapped to opaque integer - #: datatype. - cudaEglColorFormatBayerIspGBRG = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerIspGBRG{{endif}} + cudaEglColorFormatBayerIspGBRG = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerIspGBRG, + 'Nvidia proprietary Bayer ISP format - one channel in one surface with\n' + 'interleaved GBRG ordering and mapped to opaque integer datatype.\n' + ){{endif}} {{if True}} - #: Bayer format - one channel in one surface with interleaved BCCR - #: ordering. - cudaEglColorFormatBayerBCCR = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerBCCR{{endif}} + cudaEglColorFormatBayerBCCR = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerBCCR, + 'Bayer format - one channel in one surface with interleaved BCCR ordering.\n' + ){{endif}} {{if True}} - #: Bayer format - one channel in one surface with interleaved RCCB - #: ordering. - cudaEglColorFormatBayerRCCB = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerRCCB{{endif}} + cudaEglColorFormatBayerRCCB = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerRCCB, + 'Bayer format - one channel in one surface with interleaved RCCB ordering.\n' + ){{endif}} {{if True}} - #: Bayer format - one channel in one surface with interleaved CRBC - #: ordering. - cudaEglColorFormatBayerCRBC = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerCRBC{{endif}} + cudaEglColorFormatBayerCRBC = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerCRBC, + 'Bayer format - one channel in one surface with interleaved CRBC ordering.\n' + ){{endif}} {{if True}} - #: Bayer format - one channel in one surface with interleaved CBRC - #: ordering. - cudaEglColorFormatBayerCBRC = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerCBRC{{endif}} + cudaEglColorFormatBayerCBRC = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayerCBRC, + 'Bayer format - one channel in one surface with interleaved CBRC ordering.\n' + ){{endif}} {{if True}} - #: Bayer10 format - one channel in one surface with interleaved CCCC - #: ordering. Out of 16 bits, 10 bits used 6 bits No-op. - cudaEglColorFormatBayer10CCCC = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer10CCCC{{endif}} + cudaEglColorFormatBayer10CCCC = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer10CCCC, + 'Bayer10 format - one channel in one surface with interleaved CCCC ordering.\n' + 'Out of 16 bits, 10 bits used 6 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer12 format - one channel in one surface with interleaved BCCR - #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. - cudaEglColorFormatBayer12BCCR = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12BCCR{{endif}} + cudaEglColorFormatBayer12BCCR = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12BCCR, + 'Bayer12 format - one channel in one surface with interleaved BCCR ordering.\n' + 'Out of 16 bits, 12 bits used 4 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer12 format - one channel in one surface with interleaved RCCB - #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. - cudaEglColorFormatBayer12RCCB = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12RCCB{{endif}} + cudaEglColorFormatBayer12RCCB = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12RCCB, + 'Bayer12 format - one channel in one surface with interleaved RCCB ordering.\n' + 'Out of 16 bits, 12 bits used 4 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer12 format - one channel in one surface with interleaved CRBC - #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. - cudaEglColorFormatBayer12CRBC = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12CRBC{{endif}} + cudaEglColorFormatBayer12CRBC = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12CRBC, + 'Bayer12 format - one channel in one surface with interleaved CRBC ordering.\n' + 'Out of 16 bits, 12 bits used 4 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer12 format - one channel in one surface with interleaved CBRC - #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. - cudaEglColorFormatBayer12CBRC = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12CBRC{{endif}} + cudaEglColorFormatBayer12CBRC = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12CBRC, + 'Bayer12 format - one channel in one surface with interleaved CBRC ordering.\n' + 'Out of 16 bits, 12 bits used 4 bits No-op.\n' + ){{endif}} {{if True}} - #: Bayer12 format - one channel in one surface with interleaved CCCC - #: ordering. Out of 16 bits, 12 bits used 4 bits No-op. - cudaEglColorFormatBayer12CCCC = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12CCCC{{endif}} + cudaEglColorFormatBayer12CCCC = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatBayer12CCCC, + 'Bayer12 format - one channel in one surface with interleaved CCCC ordering.\n' + 'Out of 16 bits, 12 bits used 4 bits No-op.\n' + ){{endif}} {{if True}} - #: Color format for single Y plane. - cudaEglColorFormatY = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY{{endif}} + cudaEglColorFormatY = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY, + 'Color format for single Y plane.\n' + ){{endif}} {{if True}} - #: Y, UV in two surfaces (UV as one surface) U/V width = 1/2 Y width, - #: U/V height = 1/2 Y height. - cudaEglColorFormatYUV420SemiPlanar_2020 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV420SemiPlanar_2020{{endif}} + cudaEglColorFormatYUV420SemiPlanar_2020 = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV420SemiPlanar_2020, + 'Y, UV in two surfaces (UV as one surface) U/V width = 1/2 Y width, U/V\n' + 'height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Y, VU in two surfaces (VU as one surface) U/V width = 1/2 Y width, - #: U/V height = 1/2 Y height. - cudaEglColorFormatYVU420SemiPlanar_2020 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU420SemiPlanar_2020{{endif}} + cudaEglColorFormatYVU420SemiPlanar_2020 = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU420SemiPlanar_2020, + 'Y, VU in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V\n' + 'height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Y, U, V in three surfaces, each in a separate surface, U/V width = - #: 1/2 Y width, U/V height = 1/2 Y height. - cudaEglColorFormatYUV420Planar_2020 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV420Planar_2020{{endif}} + cudaEglColorFormatYUV420Planar_2020 = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV420Planar_2020, + 'Y, U, V in three surfaces, each in a separate surface, U/V width = 1/2 Y\n' + 'width, U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Y, V, U in three surfaces, each in a separate surface, U/V width = - #: 1/2 Y width, U/V height = 1/2 Y height. - cudaEglColorFormatYVU420Planar_2020 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU420Planar_2020{{endif}} + cudaEglColorFormatYVU420Planar_2020 = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU420Planar_2020, + 'Y, V, U in three surfaces, each in a separate surface, U/V width = 1/2 Y\n' + 'width, U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Y, UV in two surfaces (UV as one surface) U/V width = 1/2 Y width, - #: U/V height = 1/2 Y height. - cudaEglColorFormatYUV420SemiPlanar_709 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV420SemiPlanar_709{{endif}} + cudaEglColorFormatYUV420SemiPlanar_709 = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV420SemiPlanar_709, + 'Y, UV in two surfaces (UV as one surface) U/V width = 1/2 Y width, U/V\n' + 'height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Y, VU in two surfaces (VU as one surface) U/V width = 1/2 Y width, - #: U/V height = 1/2 Y height. - cudaEglColorFormatYVU420SemiPlanar_709 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU420SemiPlanar_709{{endif}} + cudaEglColorFormatYVU420SemiPlanar_709 = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU420SemiPlanar_709, + 'Y, VU in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V\n' + 'height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Y, U, V in three surfaces, each in a separate surface, U/V width = - #: 1/2 Y width, U/V height = 1/2 Y height. - cudaEglColorFormatYUV420Planar_709 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV420Planar_709{{endif}} + cudaEglColorFormatYUV420Planar_709 = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUV420Planar_709, + 'Y, U, V in three surfaces, each in a separate surface, U/V width = 1/2 Y\n' + 'width, U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Y, V, U in three surfaces, each in a separate surface, U/V width = - #: 1/2 Y width, U/V height = 1/2 Y height. - cudaEglColorFormatYVU420Planar_709 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU420Planar_709{{endif}} + cudaEglColorFormatYVU420Planar_709 = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVU420Planar_709, + 'Y, V, U in three surfaces, each in a separate surface, U/V width = 1/2 Y\n' + 'width, U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y - #: width, U/V height = 1/2 Y height. - cudaEglColorFormatY10V10U10_420SemiPlanar_709 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_420SemiPlanar_709{{endif}} + cudaEglColorFormatY10V10U10_420SemiPlanar_709 = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_420SemiPlanar_709, + 'Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y width,\n' + 'U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y - #: width, U/V height = 1/2 Y height. - cudaEglColorFormatY10V10U10_420SemiPlanar_2020 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_420SemiPlanar_2020{{endif}} + cudaEglColorFormatY10V10U10_420SemiPlanar_2020 = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_420SemiPlanar_2020, + 'Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y width,\n' + 'U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y - #: width, U/V height = Y height. - cudaEglColorFormatY10V10U10_422SemiPlanar_2020 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_422SemiPlanar_2020{{endif}} + cudaEglColorFormatY10V10U10_422SemiPlanar_2020 = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_422SemiPlanar_2020, + 'Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y width,\n' + 'U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y - #: width, U/V height = Y height. - cudaEglColorFormatY10V10U10_422SemiPlanar = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_422SemiPlanar{{endif}} + cudaEglColorFormatY10V10U10_422SemiPlanar = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_422SemiPlanar, + 'Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y width,\n' + 'U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y - #: width, U/V height = Y height. - cudaEglColorFormatY10V10U10_422SemiPlanar_709 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_422SemiPlanar_709{{endif}} + cudaEglColorFormatY10V10U10_422SemiPlanar_709 = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_422SemiPlanar_709, + 'Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y width,\n' + 'U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Color format for single Y plane. - cudaEglColorFormatY_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY_ER{{endif}} + cudaEglColorFormatY_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY_ER, + 'Extended Range Color format for single Y plane.\n' + ){{endif}} {{if True}} - #: Extended Range Color format for single Y plane. - cudaEglColorFormatY_709_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY_709_ER{{endif}} + cudaEglColorFormatY_709_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY_709_ER, + 'Extended Range Color format for single Y plane.\n' + ){{endif}} {{if True}} - #: Extended Range Color format for single Y10 plane. - cudaEglColorFormatY10_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10_ER{{endif}} + cudaEglColorFormatY10_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10_ER, + 'Extended Range Color format for single Y10 plane.\n' + ){{endif}} {{if True}} - #: Extended Range Color format for single Y10 plane. - cudaEglColorFormatY10_709_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10_709_ER{{endif}} + cudaEglColorFormatY10_709_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10_709_ER, + 'Extended Range Color format for single Y10 plane.\n' + ){{endif}} {{if True}} - #: Extended Range Color format for single Y12 plane. - cudaEglColorFormatY12_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY12_ER{{endif}} + cudaEglColorFormatY12_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY12_ER, + 'Extended Range Color format for single Y12 plane.\n' + ){{endif}} {{if True}} - #: Extended Range Color format for single Y12 plane. - cudaEglColorFormatY12_709_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY12_709_ER{{endif}} + cudaEglColorFormatY12_709_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY12_709_ER, + 'Extended Range Color format for single Y12 plane.\n' + ){{endif}} {{if True}} - #: Y, U, V, A four channels in one surface, interleaved as AVUY. - cudaEglColorFormatYUVA = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUVA{{endif}} + cudaEglColorFormatYUVA = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYUVA, + 'Y, U, V, A four channels in one surface, interleaved as AVUY.\n' + ){{endif}} {{if True}} - #: Y, U, V in one surface, interleaved as YVYU in one channel. - cudaEglColorFormatYVYU = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVYU{{endif}} + cudaEglColorFormatYVYU = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatYVYU, + 'Y, U, V in one surface, interleaved as YVYU in one channel.\n' + ){{endif}} {{if True}} - #: Y, U, V in one surface, interleaved as VYUY in one channel. - cudaEglColorFormatVYUY = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatVYUY{{endif}} + cudaEglColorFormatVYUY = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatVYUY, + 'Y, U, V in one surface, interleaved as VYUY in one channel.\n' + ){{endif}} {{if True}} - #: Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V - #: width = 1/2 Y width, U/V height = 1/2 Y height. - cudaEglColorFormatY10V10U10_420SemiPlanar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_420SemiPlanar_ER{{endif}} + cudaEglColorFormatY10V10U10_420SemiPlanar_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_420SemiPlanar_ER, + 'Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V width =\n' + '1/2 Y width, U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V - #: width = 1/2 Y width, U/V height = 1/2 Y height. - cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER{{endif}} + cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER, + 'Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V width =\n' + '1/2 Y width, U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V - #: width = Y width, U/V height = Y height. - cudaEglColorFormatY10V10U10_444SemiPlanar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_444SemiPlanar_ER{{endif}} + cudaEglColorFormatY10V10U10_444SemiPlanar_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_444SemiPlanar_ER, + 'Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V width =\n' + 'Y width, U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V - #: width = Y width, U/V height = Y height. - cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER{{endif}} + cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER, + 'Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V width =\n' + 'Y width, U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V - #: width = 1/2 Y width, U/V height = 1/2 Y height. - cudaEglColorFormatY12V12U12_420SemiPlanar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY12V12U12_420SemiPlanar_ER{{endif}} + cudaEglColorFormatY12V12U12_420SemiPlanar_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY12V12U12_420SemiPlanar_ER, + 'Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width =\n' + '1/2 Y width, U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V - #: width = 1/2 Y width, U/V height = 1/2 Y height. - cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER{{endif}} + cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER, + 'Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width =\n' + '1/2 Y width, U/V height = 1/2 Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V - #: width = Y width, U/V height = Y height. - cudaEglColorFormatY12V12U12_444SemiPlanar_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY12V12U12_444SemiPlanar_ER{{endif}} + cudaEglColorFormatY12V12U12_444SemiPlanar_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY12V12U12_444SemiPlanar_ER, + 'Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width =\n' + 'Y width, U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V - #: width = Y width, U/V height = Y height. - cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER{{endif}} + cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER, + 'Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width =\n' + 'Y width, U/V height = Y height.\n' + ){{endif}} {{if True}} - #: Y, U, V in one surface, interleaved as UYVY in one channel. - cudaEglColorFormatUYVY709 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatUYVY709{{endif}} + cudaEglColorFormatUYVY709 = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatUYVY709, + 'Y, U, V in one surface, interleaved as UYVY in one channel.\n' + ){{endif}} {{if True}} - #: Extended Range Y, U, V in one surface, interleaved as UYVY in one - #: channel. - cudaEglColorFormatUYVY709_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatUYVY709_ER{{endif}} + cudaEglColorFormatUYVY709_ER = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatUYVY709_ER, + 'Extended Range Y, U, V in one surface, interleaved as UYVY in one channel.\n' + ){{endif}} {{if True}} - #: Y, U, V in one surface, interleaved as UYVY in one channel. - cudaEglColorFormatUYVY2020 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatUYVY2020{{endif}} + cudaEglColorFormatUYVY2020 = ( + cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatUYVY2020, + 'Y, U, V in one surface, interleaved as UYVY in one channel.\n' + ){{endif}} -_dict_cudaEglColorFormat = dict(((int(v), v) for k, v in cudaEglColorFormat.__members__.items())) {{endif}} {{if 'cudaChannelFormatKind' in found_types}} -class cudaChannelFormatKind(IntEnum): +class cudaChannelFormatKind(_FastEnum): """ Channel format kind """ {{if 'cudaChannelFormatKindSigned' in found_values}} - #: Signed channel format - cudaChannelFormatKindSigned = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSigned{{endif}} + cudaChannelFormatKindSigned = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSigned, + 'Signed channel format\n' + ){{endif}} {{if 'cudaChannelFormatKindUnsigned' in found_values}} - #: Unsigned channel format - cudaChannelFormatKindUnsigned = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsigned{{endif}} + cudaChannelFormatKindUnsigned = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsigned, + 'Unsigned channel format\n' + ){{endif}} {{if 'cudaChannelFormatKindFloat' in found_values}} - #: Float channel format - cudaChannelFormatKindFloat = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindFloat{{endif}} + cudaChannelFormatKindFloat = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindFloat, + 'Float channel format\n' + ){{endif}} {{if 'cudaChannelFormatKindNone' in found_values}} - #: No channel format - cudaChannelFormatKindNone = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindNone{{endif}} + cudaChannelFormatKindNone = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindNone, + 'No channel format\n' + ){{endif}} {{if 'cudaChannelFormatKindNV12' in found_values}} - #: Unsigned 8-bit integers, planar 4:2:0 YUV format - cudaChannelFormatKindNV12 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindNV12{{endif}} + cudaChannelFormatKindNV12 = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindNV12, + 'Unsigned 8-bit integers, planar 4:2:0 YUV format\n' + ){{endif}} {{if 'cudaChannelFormatKindUnsignedNormalized8X1' in found_values}} - #: 1 channel unsigned 8-bit normalized integer - cudaChannelFormatKindUnsignedNormalized8X1 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1{{endif}} + cudaChannelFormatKindUnsignedNormalized8X1 = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X1, + '1 channel unsigned 8-bit normalized integer\n' + ){{endif}} {{if 'cudaChannelFormatKindUnsignedNormalized8X2' in found_values}} - #: 2 channel unsigned 8-bit normalized integer - cudaChannelFormatKindUnsignedNormalized8X2 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2{{endif}} + cudaChannelFormatKindUnsignedNormalized8X2 = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X2, + '2 channel unsigned 8-bit normalized integer\n' + ){{endif}} {{if 'cudaChannelFormatKindUnsignedNormalized8X4' in found_values}} - #: 4 channel unsigned 8-bit normalized integer - cudaChannelFormatKindUnsignedNormalized8X4 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4{{endif}} + cudaChannelFormatKindUnsignedNormalized8X4 = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized8X4, + '4 channel unsigned 8-bit normalized integer\n' + ){{endif}} {{if 'cudaChannelFormatKindUnsignedNormalized16X1' in found_values}} - #: 1 channel unsigned 16-bit normalized integer - cudaChannelFormatKindUnsignedNormalized16X1 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1{{endif}} + cudaChannelFormatKindUnsignedNormalized16X1 = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X1, + '1 channel unsigned 16-bit normalized integer\n' + ){{endif}} {{if 'cudaChannelFormatKindUnsignedNormalized16X2' in found_values}} - #: 2 channel unsigned 16-bit normalized integer - cudaChannelFormatKindUnsignedNormalized16X2 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2{{endif}} + cudaChannelFormatKindUnsignedNormalized16X2 = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X2, + '2 channel unsigned 16-bit normalized integer\n' + ){{endif}} {{if 'cudaChannelFormatKindUnsignedNormalized16X4' in found_values}} - #: 4 channel unsigned 16-bit normalized integer - cudaChannelFormatKindUnsignedNormalized16X4 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4{{endif}} + cudaChannelFormatKindUnsignedNormalized16X4 = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized16X4, + '4 channel unsigned 16-bit normalized integer\n' + ){{endif}} {{if 'cudaChannelFormatKindSignedNormalized8X1' in found_values}} - #: 1 channel signed 8-bit normalized integer - cudaChannelFormatKindSignedNormalized8X1 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1{{endif}} + cudaChannelFormatKindSignedNormalized8X1 = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X1, + '1 channel signed 8-bit normalized integer\n' + ){{endif}} {{if 'cudaChannelFormatKindSignedNormalized8X2' in found_values}} - #: 2 channel signed 8-bit normalized integer - cudaChannelFormatKindSignedNormalized8X2 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2{{endif}} + cudaChannelFormatKindSignedNormalized8X2 = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X2, + '2 channel signed 8-bit normalized integer\n' + ){{endif}} {{if 'cudaChannelFormatKindSignedNormalized8X4' in found_values}} - #: 4 channel signed 8-bit normalized integer - cudaChannelFormatKindSignedNormalized8X4 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4{{endif}} + cudaChannelFormatKindSignedNormalized8X4 = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized8X4, + '4 channel signed 8-bit normalized integer\n' + ){{endif}} {{if 'cudaChannelFormatKindSignedNormalized16X1' in found_values}} - #: 1 channel signed 16-bit normalized integer - cudaChannelFormatKindSignedNormalized16X1 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1{{endif}} + cudaChannelFormatKindSignedNormalized16X1 = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X1, + '1 channel signed 16-bit normalized integer\n' + ){{endif}} {{if 'cudaChannelFormatKindSignedNormalized16X2' in found_values}} - #: 2 channel signed 16-bit normalized integer - cudaChannelFormatKindSignedNormalized16X2 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2{{endif}} + cudaChannelFormatKindSignedNormalized16X2 = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X2, + '2 channel signed 16-bit normalized integer\n' + ){{endif}} {{if 'cudaChannelFormatKindSignedNormalized16X4' in found_values}} - #: 4 channel signed 16-bit normalized integer - cudaChannelFormatKindSignedNormalized16X4 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4{{endif}} + cudaChannelFormatKindSignedNormalized16X4 = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedNormalized16X4, + '4 channel signed 16-bit normalized integer\n' + ){{endif}} {{if 'cudaChannelFormatKindUnsignedBlockCompressed1' in found_values}} - #: 4 channel unsigned normalized block-compressed (BC1 compression) - #: format - cudaChannelFormatKindUnsignedBlockCompressed1 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1{{endif}} + cudaChannelFormatKindUnsignedBlockCompressed1 = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1, + '4 channel unsigned normalized block-compressed (BC1 compression) format\n' + ){{endif}} {{if 'cudaChannelFormatKindUnsignedBlockCompressed1SRGB' in found_values}} - #: 4 channel unsigned normalized block-compressed (BC1 compression) - #: format with sRGB encoding - cudaChannelFormatKindUnsignedBlockCompressed1SRGB = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB{{endif}} + cudaChannelFormatKindUnsignedBlockCompressed1SRGB = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed1SRGB, + '4 channel unsigned normalized block-compressed (BC1 compression) format\n' + 'with sRGB encoding\n' + ){{endif}} {{if 'cudaChannelFormatKindUnsignedBlockCompressed2' in found_values}} - #: 4 channel unsigned normalized block-compressed (BC2 compression) - #: format - cudaChannelFormatKindUnsignedBlockCompressed2 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2{{endif}} + cudaChannelFormatKindUnsignedBlockCompressed2 = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2, + '4 channel unsigned normalized block-compressed (BC2 compression) format\n' + ){{endif}} {{if 'cudaChannelFormatKindUnsignedBlockCompressed2SRGB' in found_values}} - #: 4 channel unsigned normalized block-compressed (BC2 compression) - #: format with sRGB encoding - cudaChannelFormatKindUnsignedBlockCompressed2SRGB = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB{{endif}} + cudaChannelFormatKindUnsignedBlockCompressed2SRGB = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed2SRGB, + '4 channel unsigned normalized block-compressed (BC2 compression) format\n' + 'with sRGB encoding\n' + ){{endif}} {{if 'cudaChannelFormatKindUnsignedBlockCompressed3' in found_values}} - #: 4 channel unsigned normalized block-compressed (BC3 compression) - #: format - cudaChannelFormatKindUnsignedBlockCompressed3 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3{{endif}} + cudaChannelFormatKindUnsignedBlockCompressed3 = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3, + '4 channel unsigned normalized block-compressed (BC3 compression) format\n' + ){{endif}} {{if 'cudaChannelFormatKindUnsignedBlockCompressed3SRGB' in found_values}} - #: 4 channel unsigned normalized block-compressed (BC3 compression) - #: format with sRGB encoding - cudaChannelFormatKindUnsignedBlockCompressed3SRGB = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB{{endif}} + cudaChannelFormatKindUnsignedBlockCompressed3SRGB = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed3SRGB, + '4 channel unsigned normalized block-compressed (BC3 compression) format\n' + 'with sRGB encoding\n' + ){{endif}} {{if 'cudaChannelFormatKindUnsignedBlockCompressed4' in found_values}} - #: 1 channel unsigned normalized block-compressed (BC4 compression) - #: format - cudaChannelFormatKindUnsignedBlockCompressed4 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4{{endif}} + cudaChannelFormatKindUnsignedBlockCompressed4 = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed4, + '1 channel unsigned normalized block-compressed (BC4 compression) format\n' + ){{endif}} {{if 'cudaChannelFormatKindSignedBlockCompressed4' in found_values}} - #: 1 channel signed normalized block-compressed (BC4 compression) - #: format - cudaChannelFormatKindSignedBlockCompressed4 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4{{endif}} + cudaChannelFormatKindSignedBlockCompressed4 = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed4, + '1 channel signed normalized block-compressed (BC4 compression) format\n' + ){{endif}} {{if 'cudaChannelFormatKindUnsignedBlockCompressed5' in found_values}} - #: 2 channel unsigned normalized block-compressed (BC5 compression) - #: format - cudaChannelFormatKindUnsignedBlockCompressed5 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5{{endif}} + cudaChannelFormatKindUnsignedBlockCompressed5 = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed5, + '2 channel unsigned normalized block-compressed (BC5 compression) format\n' + ){{endif}} {{if 'cudaChannelFormatKindSignedBlockCompressed5' in found_values}} - #: 2 channel signed normalized block-compressed (BC5 compression) - #: format - cudaChannelFormatKindSignedBlockCompressed5 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5{{endif}} + cudaChannelFormatKindSignedBlockCompressed5 = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed5, + '2 channel signed normalized block-compressed (BC5 compression) format\n' + ){{endif}} {{if 'cudaChannelFormatKindUnsignedBlockCompressed6H' in found_values}} - #: 3 channel unsigned half-float block-compressed (BC6H compression) - #: format - cudaChannelFormatKindUnsignedBlockCompressed6H = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H{{endif}} + cudaChannelFormatKindUnsignedBlockCompressed6H = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed6H, + '3 channel unsigned half-float block-compressed (BC6H compression) format\n' + ){{endif}} {{if 'cudaChannelFormatKindSignedBlockCompressed6H' in found_values}} - #: 3 channel signed half-float block-compressed (BC6H compression) - #: format - cudaChannelFormatKindSignedBlockCompressed6H = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H{{endif}} + cudaChannelFormatKindSignedBlockCompressed6H = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H, + '3 channel signed half-float block-compressed (BC6H compression) format\n' + ){{endif}} {{if 'cudaChannelFormatKindUnsignedBlockCompressed7' in found_values}} - #: 4 channel unsigned normalized block-compressed (BC7 compression) - #: format - cudaChannelFormatKindUnsignedBlockCompressed7 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7{{endif}} + cudaChannelFormatKindUnsignedBlockCompressed7 = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7, + '4 channel unsigned normalized block-compressed (BC7 compression) format\n' + ){{endif}} {{if 'cudaChannelFormatKindUnsignedBlockCompressed7SRGB' in found_values}} - #: 4 channel unsigned normalized block-compressed (BC7 compression) - #: format with sRGB encoding - cudaChannelFormatKindUnsignedBlockCompressed7SRGB = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB{{endif}} + cudaChannelFormatKindUnsignedBlockCompressed7SRGB = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB, + '4 channel unsigned normalized block-compressed (BC7 compression) format\n' + 'with sRGB encoding\n' + ){{endif}} {{if 'cudaChannelFormatKindUnsignedNormalized1010102' in found_values}} - #: 4 channel unsigned normalized (10-bit, 10-bit, 10-bit, 2-bit) format - cudaChannelFormatKindUnsignedNormalized1010102 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102{{endif}} + cudaChannelFormatKindUnsignedNormalized1010102 = ( + cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102, + '4 channel unsigned normalized (10-bit, 10-bit, 10-bit, 2-bit) format\n' + ){{endif}} -_dict_cudaChannelFormatKind = dict(((int(v), v) for k, v in cudaChannelFormatKind.__members__.items())) {{endif}} {{if 'cudaMemoryType' in found_types}} -class cudaMemoryType(IntEnum): +class cudaMemoryType(_FastEnum): """ CUDA memory types """ {{if 'cudaMemoryTypeUnregistered' in found_values}} - #: Unregistered memory - cudaMemoryTypeUnregistered = cyruntime.cudaMemoryType.cudaMemoryTypeUnregistered{{endif}} + cudaMemoryTypeUnregistered = ( + cyruntime.cudaMemoryType.cudaMemoryTypeUnregistered, + 'Unregistered memory\n' + ){{endif}} {{if 'cudaMemoryTypeHost' in found_values}} - #: Host memory - cudaMemoryTypeHost = cyruntime.cudaMemoryType.cudaMemoryTypeHost{{endif}} + cudaMemoryTypeHost = ( + cyruntime.cudaMemoryType.cudaMemoryTypeHost, + 'Host memory\n' + ){{endif}} {{if 'cudaMemoryTypeDevice' in found_values}} - #: Device memory - cudaMemoryTypeDevice = cyruntime.cudaMemoryType.cudaMemoryTypeDevice{{endif}} + cudaMemoryTypeDevice = ( + cyruntime.cudaMemoryType.cudaMemoryTypeDevice, + 'Device memory\n' + ){{endif}} {{if 'cudaMemoryTypeManaged' in found_values}} - #: Managed memory - cudaMemoryTypeManaged = cyruntime.cudaMemoryType.cudaMemoryTypeManaged{{endif}} + cudaMemoryTypeManaged = ( + cyruntime.cudaMemoryType.cudaMemoryTypeManaged, + 'Managed memory\n' + ){{endif}} -_dict_cudaMemoryType = dict(((int(v), v) for k, v in cudaMemoryType.__members__.items())) {{endif}} {{if 'cudaMemcpyKind' in found_types}} -class cudaMemcpyKind(IntEnum): +class cudaMemcpyKind(_FastEnum): """ CUDA memory copy types """ {{if 'cudaMemcpyHostToHost' in found_values}} - #: Host -> Host - cudaMemcpyHostToHost = cyruntime.cudaMemcpyKind.cudaMemcpyHostToHost{{endif}} + cudaMemcpyHostToHost = ( + cyruntime.cudaMemcpyKind.cudaMemcpyHostToHost, + 'Host -> Host\n' + ){{endif}} {{if 'cudaMemcpyHostToDevice' in found_values}} - #: Host -> Device - cudaMemcpyHostToDevice = cyruntime.cudaMemcpyKind.cudaMemcpyHostToDevice{{endif}} + cudaMemcpyHostToDevice = ( + cyruntime.cudaMemcpyKind.cudaMemcpyHostToDevice, + 'Host -> Device\n' + ){{endif}} {{if 'cudaMemcpyDeviceToHost' in found_values}} - #: Device -> Host - cudaMemcpyDeviceToHost = cyruntime.cudaMemcpyKind.cudaMemcpyDeviceToHost{{endif}} + cudaMemcpyDeviceToHost = ( + cyruntime.cudaMemcpyKind.cudaMemcpyDeviceToHost, + 'Device -> Host\n' + ){{endif}} {{if 'cudaMemcpyDeviceToDevice' in found_values}} - #: Device -> Device - cudaMemcpyDeviceToDevice = cyruntime.cudaMemcpyKind.cudaMemcpyDeviceToDevice{{endif}} + cudaMemcpyDeviceToDevice = ( + cyruntime.cudaMemcpyKind.cudaMemcpyDeviceToDevice, + 'Device -> Device\n' + ){{endif}} {{if 'cudaMemcpyDefault' in found_values}} - #: Direction of the transfer is inferred from the pointer values. - #: Requires unified virtual addressing - cudaMemcpyDefault = cyruntime.cudaMemcpyKind.cudaMemcpyDefault{{endif}} + cudaMemcpyDefault = ( + cyruntime.cudaMemcpyKind.cudaMemcpyDefault, + 'Direction of the transfer is inferred from the pointer values. Requires\n' + 'unified virtual addressing\n' + ){{endif}} -_dict_cudaMemcpyKind = dict(((int(v), v) for k, v in cudaMemcpyKind.__members__.items())) {{endif}} {{if 'cudaAccessProperty' in found_types}} -class cudaAccessProperty(IntEnum): +class cudaAccessProperty(_FastEnum): """ Specifies performance hint with :py:obj:`~.cudaAccessPolicyWindow` for hitProp and missProp members. """ {{if 'cudaAccessPropertyNormal' in found_values}} - #: Normal cache persistence. - cudaAccessPropertyNormal = cyruntime.cudaAccessProperty.cudaAccessPropertyNormal{{endif}} + cudaAccessPropertyNormal = ( + cyruntime.cudaAccessProperty.cudaAccessPropertyNormal, + 'Normal cache persistence.\n' + ){{endif}} {{if 'cudaAccessPropertyStreaming' in found_values}} - #: Streaming access is less likely to persit from cache. - cudaAccessPropertyStreaming = cyruntime.cudaAccessProperty.cudaAccessPropertyStreaming{{endif}} + cudaAccessPropertyStreaming = ( + cyruntime.cudaAccessProperty.cudaAccessPropertyStreaming, + 'Streaming access is less likely to persit from cache.\n' + ){{endif}} {{if 'cudaAccessPropertyPersisting' in found_values}} - #: Persisting access is more likely to persist in cache. - cudaAccessPropertyPersisting = cyruntime.cudaAccessProperty.cudaAccessPropertyPersisting{{endif}} + cudaAccessPropertyPersisting = ( + cyruntime.cudaAccessProperty.cudaAccessPropertyPersisting, + 'Persisting access is more likely to persist in cache.\n' + ){{endif}} -_dict_cudaAccessProperty = dict(((int(v), v) for k, v in cudaAccessProperty.__members__.items())) {{endif}} {{if 'cudaStreamCaptureStatus' in found_types}} -class cudaStreamCaptureStatus(IntEnum): +class cudaStreamCaptureStatus(_FastEnum): """ Possible stream capture statuses returned by :py:obj:`~.cudaStreamIsCapturing` """ {{if 'cudaStreamCaptureStatusNone' in found_values}} - #: Stream is not capturing - cudaStreamCaptureStatusNone = cyruntime.cudaStreamCaptureStatus.cudaStreamCaptureStatusNone{{endif}} + cudaStreamCaptureStatusNone = ( + cyruntime.cudaStreamCaptureStatus.cudaStreamCaptureStatusNone, + 'Stream is not capturing\n' + ){{endif}} {{if 'cudaStreamCaptureStatusActive' in found_values}} - #: Stream is actively capturing - cudaStreamCaptureStatusActive = cyruntime.cudaStreamCaptureStatus.cudaStreamCaptureStatusActive{{endif}} + cudaStreamCaptureStatusActive = ( + cyruntime.cudaStreamCaptureStatus.cudaStreamCaptureStatusActive, + 'Stream is actively capturing\n' + ){{endif}} {{if 'cudaStreamCaptureStatusInvalidated' in found_values}} - #: Stream is part of a capture sequence that has been invalidated, but - #: not terminated - cudaStreamCaptureStatusInvalidated = cyruntime.cudaStreamCaptureStatus.cudaStreamCaptureStatusInvalidated{{endif}} + cudaStreamCaptureStatusInvalidated = ( + cyruntime.cudaStreamCaptureStatus.cudaStreamCaptureStatusInvalidated, + 'Stream is part of a capture sequence that has been invalidated, but not\n' + 'terminated\n' + ){{endif}} -_dict_cudaStreamCaptureStatus = dict(((int(v), v) for k, v in cudaStreamCaptureStatus.__members__.items())) {{endif}} {{if 'cudaStreamCaptureMode' in found_types}} -class cudaStreamCaptureMode(IntEnum): +class cudaStreamCaptureMode(_FastEnum): """ Possible modes for stream capture thread interactions. For more details see :py:obj:`~.cudaStreamBeginCapture` and @@ -2490,11 +3049,10 @@ class cudaStreamCaptureMode(IntEnum): {{if 'cudaStreamCaptureModeRelaxed' in found_values}} cudaStreamCaptureModeRelaxed = cyruntime.cudaStreamCaptureMode.cudaStreamCaptureModeRelaxed{{endif}} -_dict_cudaStreamCaptureMode = dict(((int(v), v) for k, v in cudaStreamCaptureMode.__members__.items())) {{endif}} {{if 'cudaSynchronizationPolicy' in found_types}} -class cudaSynchronizationPolicy(IntEnum): +class cudaSynchronizationPolicy(_FastEnum): """ """ @@ -2507,406 +3065,534 @@ class cudaSynchronizationPolicy(IntEnum): {{if 'cudaSyncPolicyBlockingSync' in found_values}} cudaSyncPolicyBlockingSync = cyruntime.cudaSynchronizationPolicy.cudaSyncPolicyBlockingSync{{endif}} -_dict_cudaSynchronizationPolicy = dict(((int(v), v) for k, v in cudaSynchronizationPolicy.__members__.items())) {{endif}} {{if 'cudaClusterSchedulingPolicy' in found_types}} -class cudaClusterSchedulingPolicy(IntEnum): +class cudaClusterSchedulingPolicy(_FastEnum): """ Cluster scheduling policies. These may be passed to :py:obj:`~.cudaFuncSetAttribute` """ {{if 'cudaClusterSchedulingPolicyDefault' in found_values}} - #: the default policy - cudaClusterSchedulingPolicyDefault = cyruntime.cudaClusterSchedulingPolicy.cudaClusterSchedulingPolicyDefault{{endif}} + cudaClusterSchedulingPolicyDefault = ( + cyruntime.cudaClusterSchedulingPolicy.cudaClusterSchedulingPolicyDefault, + 'the default policy\n' + ){{endif}} {{if 'cudaClusterSchedulingPolicySpread' in found_values}} - #: spread the blocks within a cluster to the SMs - cudaClusterSchedulingPolicySpread = cyruntime.cudaClusterSchedulingPolicy.cudaClusterSchedulingPolicySpread{{endif}} + cudaClusterSchedulingPolicySpread = ( + cyruntime.cudaClusterSchedulingPolicy.cudaClusterSchedulingPolicySpread, + 'spread the blocks within a cluster to the SMs\n' + ){{endif}} {{if 'cudaClusterSchedulingPolicyLoadBalancing' in found_values}} - #: allow the hardware to load-balance the blocks in a cluster to the - #: SMs - cudaClusterSchedulingPolicyLoadBalancing = cyruntime.cudaClusterSchedulingPolicy.cudaClusterSchedulingPolicyLoadBalancing{{endif}} + cudaClusterSchedulingPolicyLoadBalancing = ( + cyruntime.cudaClusterSchedulingPolicy.cudaClusterSchedulingPolicyLoadBalancing, + 'allow the hardware to load-balance the blocks in a cluster to the SMs\n' + ){{endif}} -_dict_cudaClusterSchedulingPolicy = dict(((int(v), v) for k, v in cudaClusterSchedulingPolicy.__members__.items())) {{endif}} {{if 'cudaStreamUpdateCaptureDependenciesFlags' in found_types}} -class cudaStreamUpdateCaptureDependenciesFlags(IntEnum): +class cudaStreamUpdateCaptureDependenciesFlags(_FastEnum): """ Flags for :py:obj:`~.cudaStreamUpdateCaptureDependencies` """ {{if 'cudaStreamAddCaptureDependencies' in found_values}} - #: Add new nodes to the dependency set - cudaStreamAddCaptureDependencies = cyruntime.cudaStreamUpdateCaptureDependenciesFlags.cudaStreamAddCaptureDependencies{{endif}} + cudaStreamAddCaptureDependencies = ( + cyruntime.cudaStreamUpdateCaptureDependenciesFlags.cudaStreamAddCaptureDependencies, + 'Add new nodes to the dependency set\n' + ){{endif}} {{if 'cudaStreamSetCaptureDependencies' in found_values}} - #: Replace the dependency set with the new nodes - cudaStreamSetCaptureDependencies = cyruntime.cudaStreamUpdateCaptureDependenciesFlags.cudaStreamSetCaptureDependencies{{endif}} + cudaStreamSetCaptureDependencies = ( + cyruntime.cudaStreamUpdateCaptureDependenciesFlags.cudaStreamSetCaptureDependencies, + 'Replace the dependency set with the new nodes\n' + ){{endif}} -_dict_cudaStreamUpdateCaptureDependenciesFlags = dict(((int(v), v) for k, v in cudaStreamUpdateCaptureDependenciesFlags.__members__.items())) {{endif}} {{if 'cudaUserObjectFlags' in found_types}} -class cudaUserObjectFlags(IntEnum): +class cudaUserObjectFlags(_FastEnum): """ Flags for user objects for graphs """ {{if 'cudaUserObjectNoDestructorSync' in found_values}} - #: Indicates the destructor execution is not synchronized by any CUDA - #: handle. - cudaUserObjectNoDestructorSync = cyruntime.cudaUserObjectFlags.cudaUserObjectNoDestructorSync{{endif}} + cudaUserObjectNoDestructorSync = ( + cyruntime.cudaUserObjectFlags.cudaUserObjectNoDestructorSync, + 'Indicates the destructor execution is not synchronized by any CUDA handle.\n' + ){{endif}} -_dict_cudaUserObjectFlags = dict(((int(v), v) for k, v in cudaUserObjectFlags.__members__.items())) {{endif}} {{if 'cudaUserObjectRetainFlags' in found_types}} -class cudaUserObjectRetainFlags(IntEnum): +class cudaUserObjectRetainFlags(_FastEnum): """ Flags for retaining user object references for graphs """ {{if 'cudaGraphUserObjectMove' in found_values}} - #: Transfer references from the caller rather than creating new - #: references. - cudaGraphUserObjectMove = cyruntime.cudaUserObjectRetainFlags.cudaGraphUserObjectMove{{endif}} + cudaGraphUserObjectMove = ( + cyruntime.cudaUserObjectRetainFlags.cudaGraphUserObjectMove, + 'Transfer references from the caller rather than creating new references.\n' + ){{endif}} -_dict_cudaUserObjectRetainFlags = dict(((int(v), v) for k, v in cudaUserObjectRetainFlags.__members__.items())) {{endif}} {{if 'cudaGraphicsRegisterFlags' in found_types}} -class cudaGraphicsRegisterFlags(IntEnum): +class cudaGraphicsRegisterFlags(_FastEnum): """ CUDA graphics interop register flags """ {{if 'cudaGraphicsRegisterFlagsNone' in found_values}} - #: Default - cudaGraphicsRegisterFlagsNone = cyruntime.cudaGraphicsRegisterFlags.cudaGraphicsRegisterFlagsNone{{endif}} + cudaGraphicsRegisterFlagsNone = ( + cyruntime.cudaGraphicsRegisterFlags.cudaGraphicsRegisterFlagsNone, + 'Default\n' + ){{endif}} {{if 'cudaGraphicsRegisterFlagsReadOnly' in found_values}} - #: CUDA will not write to this resource - cudaGraphicsRegisterFlagsReadOnly = cyruntime.cudaGraphicsRegisterFlags.cudaGraphicsRegisterFlagsReadOnly{{endif}} + cudaGraphicsRegisterFlagsReadOnly = ( + cyruntime.cudaGraphicsRegisterFlags.cudaGraphicsRegisterFlagsReadOnly, + 'CUDA will not write to this resource\n' + ){{endif}} {{if 'cudaGraphicsRegisterFlagsWriteDiscard' in found_values}} - #: CUDA will only write to and will not read from this resource - cudaGraphicsRegisterFlagsWriteDiscard = cyruntime.cudaGraphicsRegisterFlags.cudaGraphicsRegisterFlagsWriteDiscard{{endif}} + cudaGraphicsRegisterFlagsWriteDiscard = ( + cyruntime.cudaGraphicsRegisterFlags.cudaGraphicsRegisterFlagsWriteDiscard, + 'CUDA will only write to and will not read from this resource\n' + ){{endif}} {{if 'cudaGraphicsRegisterFlagsSurfaceLoadStore' in found_values}} - #: CUDA will bind this resource to a surface reference - cudaGraphicsRegisterFlagsSurfaceLoadStore = cyruntime.cudaGraphicsRegisterFlags.cudaGraphicsRegisterFlagsSurfaceLoadStore{{endif}} + cudaGraphicsRegisterFlagsSurfaceLoadStore = ( + cyruntime.cudaGraphicsRegisterFlags.cudaGraphicsRegisterFlagsSurfaceLoadStore, + 'CUDA will bind this resource to a surface reference\n' + ){{endif}} {{if 'cudaGraphicsRegisterFlagsTextureGather' in found_values}} - #: CUDA will perform texture gather operations on this resource - cudaGraphicsRegisterFlagsTextureGather = cyruntime.cudaGraphicsRegisterFlags.cudaGraphicsRegisterFlagsTextureGather{{endif}} + cudaGraphicsRegisterFlagsTextureGather = ( + cyruntime.cudaGraphicsRegisterFlags.cudaGraphicsRegisterFlagsTextureGather, + 'CUDA will perform texture gather operations on this resource\n' + ){{endif}} -_dict_cudaGraphicsRegisterFlags = dict(((int(v), v) for k, v in cudaGraphicsRegisterFlags.__members__.items())) {{endif}} {{if 'cudaGraphicsMapFlags' in found_types}} -class cudaGraphicsMapFlags(IntEnum): +class cudaGraphicsMapFlags(_FastEnum): """ CUDA graphics interop map flags """ {{if 'cudaGraphicsMapFlagsNone' in found_values}} - #: Default; Assume resource can be read/written - cudaGraphicsMapFlagsNone = cyruntime.cudaGraphicsMapFlags.cudaGraphicsMapFlagsNone{{endif}} + cudaGraphicsMapFlagsNone = ( + cyruntime.cudaGraphicsMapFlags.cudaGraphicsMapFlagsNone, + 'Default; Assume resource can be read/written\n' + ){{endif}} {{if 'cudaGraphicsMapFlagsReadOnly' in found_values}} - #: CUDA will not write to this resource - cudaGraphicsMapFlagsReadOnly = cyruntime.cudaGraphicsMapFlags.cudaGraphicsMapFlagsReadOnly{{endif}} + cudaGraphicsMapFlagsReadOnly = ( + cyruntime.cudaGraphicsMapFlags.cudaGraphicsMapFlagsReadOnly, + 'CUDA will not write to this resource\n' + ){{endif}} {{if 'cudaGraphicsMapFlagsWriteDiscard' in found_values}} - #: CUDA will only write to and will not read from this resource - cudaGraphicsMapFlagsWriteDiscard = cyruntime.cudaGraphicsMapFlags.cudaGraphicsMapFlagsWriteDiscard{{endif}} + cudaGraphicsMapFlagsWriteDiscard = ( + cyruntime.cudaGraphicsMapFlags.cudaGraphicsMapFlagsWriteDiscard, + 'CUDA will only write to and will not read from this resource\n' + ){{endif}} -_dict_cudaGraphicsMapFlags = dict(((int(v), v) for k, v in cudaGraphicsMapFlags.__members__.items())) {{endif}} {{if 'cudaGraphicsCubeFace' in found_types}} -class cudaGraphicsCubeFace(IntEnum): +class cudaGraphicsCubeFace(_FastEnum): """ CUDA graphics interop array indices for cube maps """ {{if 'cudaGraphicsCubeFacePositiveX' in found_values}} - #: Positive X face of cubemap - cudaGraphicsCubeFacePositiveX = cyruntime.cudaGraphicsCubeFace.cudaGraphicsCubeFacePositiveX{{endif}} + cudaGraphicsCubeFacePositiveX = ( + cyruntime.cudaGraphicsCubeFace.cudaGraphicsCubeFacePositiveX, + 'Positive X face of cubemap\n' + ){{endif}} {{if 'cudaGraphicsCubeFaceNegativeX' in found_values}} - #: Negative X face of cubemap - cudaGraphicsCubeFaceNegativeX = cyruntime.cudaGraphicsCubeFace.cudaGraphicsCubeFaceNegativeX{{endif}} + cudaGraphicsCubeFaceNegativeX = ( + cyruntime.cudaGraphicsCubeFace.cudaGraphicsCubeFaceNegativeX, + 'Negative X face of cubemap\n' + ){{endif}} {{if 'cudaGraphicsCubeFacePositiveY' in found_values}} - #: Positive Y face of cubemap - cudaGraphicsCubeFacePositiveY = cyruntime.cudaGraphicsCubeFace.cudaGraphicsCubeFacePositiveY{{endif}} + cudaGraphicsCubeFacePositiveY = ( + cyruntime.cudaGraphicsCubeFace.cudaGraphicsCubeFacePositiveY, + 'Positive Y face of cubemap\n' + ){{endif}} {{if 'cudaGraphicsCubeFaceNegativeY' in found_values}} - #: Negative Y face of cubemap - cudaGraphicsCubeFaceNegativeY = cyruntime.cudaGraphicsCubeFace.cudaGraphicsCubeFaceNegativeY{{endif}} + cudaGraphicsCubeFaceNegativeY = ( + cyruntime.cudaGraphicsCubeFace.cudaGraphicsCubeFaceNegativeY, + 'Negative Y face of cubemap\n' + ){{endif}} {{if 'cudaGraphicsCubeFacePositiveZ' in found_values}} - #: Positive Z face of cubemap - cudaGraphicsCubeFacePositiveZ = cyruntime.cudaGraphicsCubeFace.cudaGraphicsCubeFacePositiveZ{{endif}} + cudaGraphicsCubeFacePositiveZ = ( + cyruntime.cudaGraphicsCubeFace.cudaGraphicsCubeFacePositiveZ, + 'Positive Z face of cubemap\n' + ){{endif}} {{if 'cudaGraphicsCubeFaceNegativeZ' in found_values}} - #: Negative Z face of cubemap - cudaGraphicsCubeFaceNegativeZ = cyruntime.cudaGraphicsCubeFace.cudaGraphicsCubeFaceNegativeZ{{endif}} + cudaGraphicsCubeFaceNegativeZ = ( + cyruntime.cudaGraphicsCubeFace.cudaGraphicsCubeFaceNegativeZ, + 'Negative Z face of cubemap\n' + ){{endif}} -_dict_cudaGraphicsCubeFace = dict(((int(v), v) for k, v in cudaGraphicsCubeFace.__members__.items())) {{endif}} {{if 'cudaResourceType' in found_types}} -class cudaResourceType(IntEnum): +class cudaResourceType(_FastEnum): """ CUDA resource types """ {{if 'cudaResourceTypeArray' in found_values}} - #: Array resource - cudaResourceTypeArray = cyruntime.cudaResourceType.cudaResourceTypeArray{{endif}} + cudaResourceTypeArray = ( + cyruntime.cudaResourceType.cudaResourceTypeArray, + 'Array resource\n' + ){{endif}} {{if 'cudaResourceTypeMipmappedArray' in found_values}} - #: Mipmapped array resource - cudaResourceTypeMipmappedArray = cyruntime.cudaResourceType.cudaResourceTypeMipmappedArray{{endif}} + cudaResourceTypeMipmappedArray = ( + cyruntime.cudaResourceType.cudaResourceTypeMipmappedArray, + 'Mipmapped array resource\n' + ){{endif}} {{if 'cudaResourceTypeLinear' in found_values}} - #: Linear resource - cudaResourceTypeLinear = cyruntime.cudaResourceType.cudaResourceTypeLinear{{endif}} + cudaResourceTypeLinear = ( + cyruntime.cudaResourceType.cudaResourceTypeLinear, + 'Linear resource\n' + ){{endif}} {{if 'cudaResourceTypePitch2D' in found_values}} - #: Pitch 2D resource - cudaResourceTypePitch2D = cyruntime.cudaResourceType.cudaResourceTypePitch2D{{endif}} + cudaResourceTypePitch2D = ( + cyruntime.cudaResourceType.cudaResourceTypePitch2D, + 'Pitch 2D resource\n' + ){{endif}} -_dict_cudaResourceType = dict(((int(v), v) for k, v in cudaResourceType.__members__.items())) {{endif}} {{if 'cudaResourceViewFormat' in found_types}} -class cudaResourceViewFormat(IntEnum): +class cudaResourceViewFormat(_FastEnum): """ CUDA texture resource view formats """ {{if 'cudaResViewFormatNone' in found_values}} - #: No resource view format (use underlying resource format) - cudaResViewFormatNone = cyruntime.cudaResourceViewFormat.cudaResViewFormatNone{{endif}} + cudaResViewFormatNone = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatNone, + 'No resource view format (use underlying resource format)\n' + ){{endif}} {{if 'cudaResViewFormatUnsignedChar1' in found_values}} - #: 1 channel unsigned 8-bit integers - cudaResViewFormatUnsignedChar1 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedChar1{{endif}} + cudaResViewFormatUnsignedChar1 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedChar1, + '1 channel unsigned 8-bit integers\n' + ){{endif}} {{if 'cudaResViewFormatUnsignedChar2' in found_values}} - #: 2 channel unsigned 8-bit integers - cudaResViewFormatUnsignedChar2 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedChar2{{endif}} + cudaResViewFormatUnsignedChar2 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedChar2, + '2 channel unsigned 8-bit integers\n' + ){{endif}} {{if 'cudaResViewFormatUnsignedChar4' in found_values}} - #: 4 channel unsigned 8-bit integers - cudaResViewFormatUnsignedChar4 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedChar4{{endif}} + cudaResViewFormatUnsignedChar4 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedChar4, + '4 channel unsigned 8-bit integers\n' + ){{endif}} {{if 'cudaResViewFormatSignedChar1' in found_values}} - #: 1 channel signed 8-bit integers - cudaResViewFormatSignedChar1 = cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedChar1{{endif}} + cudaResViewFormatSignedChar1 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedChar1, + '1 channel signed 8-bit integers\n' + ){{endif}} {{if 'cudaResViewFormatSignedChar2' in found_values}} - #: 2 channel signed 8-bit integers - cudaResViewFormatSignedChar2 = cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedChar2{{endif}} + cudaResViewFormatSignedChar2 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedChar2, + '2 channel signed 8-bit integers\n' + ){{endif}} {{if 'cudaResViewFormatSignedChar4' in found_values}} - #: 4 channel signed 8-bit integers - cudaResViewFormatSignedChar4 = cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedChar4{{endif}} + cudaResViewFormatSignedChar4 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedChar4, + '4 channel signed 8-bit integers\n' + ){{endif}} {{if 'cudaResViewFormatUnsignedShort1' in found_values}} - #: 1 channel unsigned 16-bit integers - cudaResViewFormatUnsignedShort1 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedShort1{{endif}} + cudaResViewFormatUnsignedShort1 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedShort1, + '1 channel unsigned 16-bit integers\n' + ){{endif}} {{if 'cudaResViewFormatUnsignedShort2' in found_values}} - #: 2 channel unsigned 16-bit integers - cudaResViewFormatUnsignedShort2 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedShort2{{endif}} + cudaResViewFormatUnsignedShort2 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedShort2, + '2 channel unsigned 16-bit integers\n' + ){{endif}} {{if 'cudaResViewFormatUnsignedShort4' in found_values}} - #: 4 channel unsigned 16-bit integers - cudaResViewFormatUnsignedShort4 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedShort4{{endif}} + cudaResViewFormatUnsignedShort4 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedShort4, + '4 channel unsigned 16-bit integers\n' + ){{endif}} {{if 'cudaResViewFormatSignedShort1' in found_values}} - #: 1 channel signed 16-bit integers - cudaResViewFormatSignedShort1 = cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedShort1{{endif}} + cudaResViewFormatSignedShort1 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedShort1, + '1 channel signed 16-bit integers\n' + ){{endif}} {{if 'cudaResViewFormatSignedShort2' in found_values}} - #: 2 channel signed 16-bit integers - cudaResViewFormatSignedShort2 = cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedShort2{{endif}} + cudaResViewFormatSignedShort2 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedShort2, + '2 channel signed 16-bit integers\n' + ){{endif}} {{if 'cudaResViewFormatSignedShort4' in found_values}} - #: 4 channel signed 16-bit integers - cudaResViewFormatSignedShort4 = cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedShort4{{endif}} + cudaResViewFormatSignedShort4 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedShort4, + '4 channel signed 16-bit integers\n' + ){{endif}} {{if 'cudaResViewFormatUnsignedInt1' in found_values}} - #: 1 channel unsigned 32-bit integers - cudaResViewFormatUnsignedInt1 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedInt1{{endif}} + cudaResViewFormatUnsignedInt1 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedInt1, + '1 channel unsigned 32-bit integers\n' + ){{endif}} {{if 'cudaResViewFormatUnsignedInt2' in found_values}} - #: 2 channel unsigned 32-bit integers - cudaResViewFormatUnsignedInt2 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedInt2{{endif}} + cudaResViewFormatUnsignedInt2 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedInt2, + '2 channel unsigned 32-bit integers\n' + ){{endif}} {{if 'cudaResViewFormatUnsignedInt4' in found_values}} - #: 4 channel unsigned 32-bit integers - cudaResViewFormatUnsignedInt4 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedInt4{{endif}} + cudaResViewFormatUnsignedInt4 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedInt4, + '4 channel unsigned 32-bit integers\n' + ){{endif}} {{if 'cudaResViewFormatSignedInt1' in found_values}} - #: 1 channel signed 32-bit integers - cudaResViewFormatSignedInt1 = cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedInt1{{endif}} + cudaResViewFormatSignedInt1 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedInt1, + '1 channel signed 32-bit integers\n' + ){{endif}} {{if 'cudaResViewFormatSignedInt2' in found_values}} - #: 2 channel signed 32-bit integers - cudaResViewFormatSignedInt2 = cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedInt2{{endif}} + cudaResViewFormatSignedInt2 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedInt2, + '2 channel signed 32-bit integers\n' + ){{endif}} {{if 'cudaResViewFormatSignedInt4' in found_values}} - #: 4 channel signed 32-bit integers - cudaResViewFormatSignedInt4 = cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedInt4{{endif}} + cudaResViewFormatSignedInt4 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedInt4, + '4 channel signed 32-bit integers\n' + ){{endif}} {{if 'cudaResViewFormatHalf1' in found_values}} - #: 1 channel 16-bit floating point - cudaResViewFormatHalf1 = cyruntime.cudaResourceViewFormat.cudaResViewFormatHalf1{{endif}} + cudaResViewFormatHalf1 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatHalf1, + '1 channel 16-bit floating point\n' + ){{endif}} {{if 'cudaResViewFormatHalf2' in found_values}} - #: 2 channel 16-bit floating point - cudaResViewFormatHalf2 = cyruntime.cudaResourceViewFormat.cudaResViewFormatHalf2{{endif}} + cudaResViewFormatHalf2 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatHalf2, + '2 channel 16-bit floating point\n' + ){{endif}} {{if 'cudaResViewFormatHalf4' in found_values}} - #: 4 channel 16-bit floating point - cudaResViewFormatHalf4 = cyruntime.cudaResourceViewFormat.cudaResViewFormatHalf4{{endif}} + cudaResViewFormatHalf4 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatHalf4, + '4 channel 16-bit floating point\n' + ){{endif}} {{if 'cudaResViewFormatFloat1' in found_values}} - #: 1 channel 32-bit floating point - cudaResViewFormatFloat1 = cyruntime.cudaResourceViewFormat.cudaResViewFormatFloat1{{endif}} + cudaResViewFormatFloat1 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatFloat1, + '1 channel 32-bit floating point\n' + ){{endif}} {{if 'cudaResViewFormatFloat2' in found_values}} - #: 2 channel 32-bit floating point - cudaResViewFormatFloat2 = cyruntime.cudaResourceViewFormat.cudaResViewFormatFloat2{{endif}} + cudaResViewFormatFloat2 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatFloat2, + '2 channel 32-bit floating point\n' + ){{endif}} {{if 'cudaResViewFormatFloat4' in found_values}} - #: 4 channel 32-bit floating point - cudaResViewFormatFloat4 = cyruntime.cudaResourceViewFormat.cudaResViewFormatFloat4{{endif}} + cudaResViewFormatFloat4 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatFloat4, + '4 channel 32-bit floating point\n' + ){{endif}} {{if 'cudaResViewFormatUnsignedBlockCompressed1' in found_values}} - #: Block compressed 1 - cudaResViewFormatUnsignedBlockCompressed1 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed1{{endif}} + cudaResViewFormatUnsignedBlockCompressed1 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed1, + 'Block compressed 1\n' + ){{endif}} {{if 'cudaResViewFormatUnsignedBlockCompressed2' in found_values}} - #: Block compressed 2 - cudaResViewFormatUnsignedBlockCompressed2 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed2{{endif}} + cudaResViewFormatUnsignedBlockCompressed2 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed2, + 'Block compressed 2\n' + ){{endif}} {{if 'cudaResViewFormatUnsignedBlockCompressed3' in found_values}} - #: Block compressed 3 - cudaResViewFormatUnsignedBlockCompressed3 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed3{{endif}} + cudaResViewFormatUnsignedBlockCompressed3 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed3, + 'Block compressed 3\n' + ){{endif}} {{if 'cudaResViewFormatUnsignedBlockCompressed4' in found_values}} - #: Block compressed 4 unsigned - cudaResViewFormatUnsignedBlockCompressed4 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed4{{endif}} + cudaResViewFormatUnsignedBlockCompressed4 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed4, + 'Block compressed 4 unsigned\n' + ){{endif}} {{if 'cudaResViewFormatSignedBlockCompressed4' in found_values}} - #: Block compressed 4 signed - cudaResViewFormatSignedBlockCompressed4 = cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedBlockCompressed4{{endif}} + cudaResViewFormatSignedBlockCompressed4 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedBlockCompressed4, + 'Block compressed 4 signed\n' + ){{endif}} {{if 'cudaResViewFormatUnsignedBlockCompressed5' in found_values}} - #: Block compressed 5 unsigned - cudaResViewFormatUnsignedBlockCompressed5 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed5{{endif}} + cudaResViewFormatUnsignedBlockCompressed5 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed5, + 'Block compressed 5 unsigned\n' + ){{endif}} {{if 'cudaResViewFormatSignedBlockCompressed5' in found_values}} - #: Block compressed 5 signed - cudaResViewFormatSignedBlockCompressed5 = cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedBlockCompressed5{{endif}} + cudaResViewFormatSignedBlockCompressed5 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedBlockCompressed5, + 'Block compressed 5 signed\n' + ){{endif}} {{if 'cudaResViewFormatUnsignedBlockCompressed6H' in found_values}} - #: Block compressed 6 unsigned half-float - cudaResViewFormatUnsignedBlockCompressed6H = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed6H{{endif}} + cudaResViewFormatUnsignedBlockCompressed6H = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed6H, + 'Block compressed 6 unsigned half-float\n' + ){{endif}} {{if 'cudaResViewFormatSignedBlockCompressed6H' in found_values}} - #: Block compressed 6 signed half-float - cudaResViewFormatSignedBlockCompressed6H = cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedBlockCompressed6H{{endif}} + cudaResViewFormatSignedBlockCompressed6H = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatSignedBlockCompressed6H, + 'Block compressed 6 signed half-float\n' + ){{endif}} {{if 'cudaResViewFormatUnsignedBlockCompressed7' in found_values}} - #: Block compressed 7 - cudaResViewFormatUnsignedBlockCompressed7 = cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed7{{endif}} + cudaResViewFormatUnsignedBlockCompressed7 = ( + cyruntime.cudaResourceViewFormat.cudaResViewFormatUnsignedBlockCompressed7, + 'Block compressed 7\n' + ){{endif}} -_dict_cudaResourceViewFormat = dict(((int(v), v) for k, v in cudaResourceViewFormat.__members__.items())) {{endif}} {{if 'cudaFuncAttribute' in found_types}} -class cudaFuncAttribute(IntEnum): +class cudaFuncAttribute(_FastEnum): """ CUDA function attributes that can be set using :py:obj:`~.cudaFuncSetAttribute` """ {{if 'cudaFuncAttributeMaxDynamicSharedMemorySize' in found_values}} - #: Maximum dynamic shared memory size - cudaFuncAttributeMaxDynamicSharedMemorySize = cyruntime.cudaFuncAttribute.cudaFuncAttributeMaxDynamicSharedMemorySize{{endif}} + cudaFuncAttributeMaxDynamicSharedMemorySize = ( + cyruntime.cudaFuncAttribute.cudaFuncAttributeMaxDynamicSharedMemorySize, + 'Maximum dynamic shared memory size\n' + ){{endif}} {{if 'cudaFuncAttributePreferredSharedMemoryCarveout' in found_values}} - #: Preferred shared memory-L1 cache split - cudaFuncAttributePreferredSharedMemoryCarveout = cyruntime.cudaFuncAttribute.cudaFuncAttributePreferredSharedMemoryCarveout{{endif}} + cudaFuncAttributePreferredSharedMemoryCarveout = ( + cyruntime.cudaFuncAttribute.cudaFuncAttributePreferredSharedMemoryCarveout, + 'Preferred shared memory-L1 cache split\n' + ){{endif}} {{if 'cudaFuncAttributeClusterDimMustBeSet' in found_values}} - #: Indicator to enforce valid cluster dimension specification on kernel - #: launch - cudaFuncAttributeClusterDimMustBeSet = cyruntime.cudaFuncAttribute.cudaFuncAttributeClusterDimMustBeSet{{endif}} + cudaFuncAttributeClusterDimMustBeSet = ( + cyruntime.cudaFuncAttribute.cudaFuncAttributeClusterDimMustBeSet, + 'Indicator to enforce valid cluster dimension specification on kernel launch\n' + ){{endif}} {{if 'cudaFuncAttributeRequiredClusterWidth' in found_values}} - #: Required cluster width - cudaFuncAttributeRequiredClusterWidth = cyruntime.cudaFuncAttribute.cudaFuncAttributeRequiredClusterWidth{{endif}} + cudaFuncAttributeRequiredClusterWidth = ( + cyruntime.cudaFuncAttribute.cudaFuncAttributeRequiredClusterWidth, + 'Required cluster width\n' + ){{endif}} {{if 'cudaFuncAttributeRequiredClusterHeight' in found_values}} - #: Required cluster height - cudaFuncAttributeRequiredClusterHeight = cyruntime.cudaFuncAttribute.cudaFuncAttributeRequiredClusterHeight{{endif}} + cudaFuncAttributeRequiredClusterHeight = ( + cyruntime.cudaFuncAttribute.cudaFuncAttributeRequiredClusterHeight, + 'Required cluster height\n' + ){{endif}} {{if 'cudaFuncAttributeRequiredClusterDepth' in found_values}} - #: Required cluster depth - cudaFuncAttributeRequiredClusterDepth = cyruntime.cudaFuncAttribute.cudaFuncAttributeRequiredClusterDepth{{endif}} + cudaFuncAttributeRequiredClusterDepth = ( + cyruntime.cudaFuncAttribute.cudaFuncAttributeRequiredClusterDepth, + 'Required cluster depth\n' + ){{endif}} {{if 'cudaFuncAttributeNonPortableClusterSizeAllowed' in found_values}} - #: Whether non-portable cluster scheduling policy is supported - cudaFuncAttributeNonPortableClusterSizeAllowed = cyruntime.cudaFuncAttribute.cudaFuncAttributeNonPortableClusterSizeAllowed{{endif}} + cudaFuncAttributeNonPortableClusterSizeAllowed = ( + cyruntime.cudaFuncAttribute.cudaFuncAttributeNonPortableClusterSizeAllowed, + 'Whether non-portable cluster scheduling policy is supported\n' + ){{endif}} {{if 'cudaFuncAttributeClusterSchedulingPolicyPreference' in found_values}} - #: Required cluster scheduling policy preference - cudaFuncAttributeClusterSchedulingPolicyPreference = cyruntime.cudaFuncAttribute.cudaFuncAttributeClusterSchedulingPolicyPreference{{endif}} + cudaFuncAttributeClusterSchedulingPolicyPreference = ( + cyruntime.cudaFuncAttribute.cudaFuncAttributeClusterSchedulingPolicyPreference, + 'Required cluster scheduling policy preference\n' + ){{endif}} {{if 'cudaFuncAttributeMax' in found_values}} cudaFuncAttributeMax = cyruntime.cudaFuncAttribute.cudaFuncAttributeMax{{endif}} -_dict_cudaFuncAttribute = dict(((int(v), v) for k, v in cudaFuncAttribute.__members__.items())) {{endif}} {{if 'cudaFuncCache' in found_types}} -class cudaFuncCache(IntEnum): +class cudaFuncCache(_FastEnum): """ CUDA function cache configurations """ {{if 'cudaFuncCachePreferNone' in found_values}} - #: Default function cache configuration, no preference - cudaFuncCachePreferNone = cyruntime.cudaFuncCache.cudaFuncCachePreferNone{{endif}} + cudaFuncCachePreferNone = ( + cyruntime.cudaFuncCache.cudaFuncCachePreferNone, + 'Default function cache configuration, no preference\n' + ){{endif}} {{if 'cudaFuncCachePreferShared' in found_values}} - #: Prefer larger shared memory and smaller L1 cache - cudaFuncCachePreferShared = cyruntime.cudaFuncCache.cudaFuncCachePreferShared{{endif}} + cudaFuncCachePreferShared = ( + cyruntime.cudaFuncCache.cudaFuncCachePreferShared, + 'Prefer larger shared memory and smaller L1 cache\n' + ){{endif}} {{if 'cudaFuncCachePreferL1' in found_values}} - #: Prefer larger L1 cache and smaller shared memory - cudaFuncCachePreferL1 = cyruntime.cudaFuncCache.cudaFuncCachePreferL1{{endif}} + cudaFuncCachePreferL1 = ( + cyruntime.cudaFuncCache.cudaFuncCachePreferL1, + 'Prefer larger L1 cache and smaller shared memory\n' + ){{endif}} {{if 'cudaFuncCachePreferEqual' in found_values}} - #: Prefer equal size L1 cache and shared memory - cudaFuncCachePreferEqual = cyruntime.cudaFuncCache.cudaFuncCachePreferEqual{{endif}} + cudaFuncCachePreferEqual = ( + cyruntime.cudaFuncCache.cudaFuncCachePreferEqual, + 'Prefer equal size L1 cache and shared memory\n' + ){{endif}} -_dict_cudaFuncCache = dict(((int(v), v) for k, v in cudaFuncCache.__members__.items())) {{endif}} {{if 'cudaSharedMemConfig' in found_types}} -class cudaSharedMemConfig(IntEnum): +class cudaSharedMemConfig(_FastEnum): """ CUDA shared memory configuration [Deprecated] """ @@ -2917,624 +3603,862 @@ class cudaSharedMemConfig(IntEnum): {{if 'cudaSharedMemBankSizeEightByte' in found_values}} cudaSharedMemBankSizeEightByte = cyruntime.cudaSharedMemConfig.cudaSharedMemBankSizeEightByte{{endif}} -_dict_cudaSharedMemConfig = dict(((int(v), v) for k, v in cudaSharedMemConfig.__members__.items())) {{endif}} {{if 'cudaSharedCarveout' in found_types}} -class cudaSharedCarveout(IntEnum): +class cudaSharedCarveout(_FastEnum): """ Shared memory carveout configurations. These may be passed to cudaFuncSetAttribute """ {{if 'cudaSharedmemCarveoutDefault' in found_values}} - #: No preference for shared memory or L1 (default) - cudaSharedmemCarveoutDefault = cyruntime.cudaSharedCarveout.cudaSharedmemCarveoutDefault{{endif}} + cudaSharedmemCarveoutDefault = ( + cyruntime.cudaSharedCarveout.cudaSharedmemCarveoutDefault, + 'No preference for shared memory or L1 (default)\n' + ){{endif}} {{if 'cudaSharedmemCarveoutMaxL1' in found_values}} - #: Prefer maximum available L1 cache, minimum shared memory - cudaSharedmemCarveoutMaxL1 = cyruntime.cudaSharedCarveout.cudaSharedmemCarveoutMaxL1{{endif}} + cudaSharedmemCarveoutMaxL1 = ( + cyruntime.cudaSharedCarveout.cudaSharedmemCarveoutMaxL1, + 'Prefer maximum available L1 cache, minimum shared memory\n' + ){{endif}} {{if 'cudaSharedmemCarveoutMaxShared' in found_values}} - #: Prefer maximum available shared memory, minimum L1 cache - cudaSharedmemCarveoutMaxShared = cyruntime.cudaSharedCarveout.cudaSharedmemCarveoutMaxShared{{endif}} + cudaSharedmemCarveoutMaxShared = ( + cyruntime.cudaSharedCarveout.cudaSharedmemCarveoutMaxShared, + 'Prefer maximum available shared memory, minimum L1 cache\n' + ){{endif}} -_dict_cudaSharedCarveout = dict(((int(v), v) for k, v in cudaSharedCarveout.__members__.items())) {{endif}} {{if 'cudaComputeMode' in found_types}} -class cudaComputeMode(IntEnum): +class cudaComputeMode(_FastEnum): """ CUDA device compute modes """ {{if 'cudaComputeModeDefault' in found_values}} - #: Default compute mode (Multiple threads can use - #: :py:obj:`~.cudaSetDevice()` with this device) - cudaComputeModeDefault = cyruntime.cudaComputeMode.cudaComputeModeDefault{{endif}} + cudaComputeModeDefault = ( + cyruntime.cudaComputeMode.cudaComputeModeDefault, + 'Default compute mode (Multiple threads can use :py:obj:`~.cudaSetDevice()`\n' + 'with this device)\n' + ){{endif}} {{if 'cudaComputeModeExclusive' in found_values}} - #: Compute-exclusive-thread mode (Only one thread in one process will - #: be able to use :py:obj:`~.cudaSetDevice()` with this device) - cudaComputeModeExclusive = cyruntime.cudaComputeMode.cudaComputeModeExclusive{{endif}} + cudaComputeModeExclusive = ( + cyruntime.cudaComputeMode.cudaComputeModeExclusive, + 'Compute-exclusive-thread mode (Only one thread in one process will be able\n' + 'to use :py:obj:`~.cudaSetDevice()` with this device)\n' + ){{endif}} {{if 'cudaComputeModeProhibited' in found_values}} - #: Compute-prohibited mode (No threads can use - #: :py:obj:`~.cudaSetDevice()` with this device) - cudaComputeModeProhibited = cyruntime.cudaComputeMode.cudaComputeModeProhibited{{endif}} + cudaComputeModeProhibited = ( + cyruntime.cudaComputeMode.cudaComputeModeProhibited, + 'Compute-prohibited mode (No threads can use :py:obj:`~.cudaSetDevice()`\n' + 'with this device)\n' + ){{endif}} {{if 'cudaComputeModeExclusiveProcess' in found_values}} - #: Compute-exclusive-process mode (Many threads in one process will be - #: able to use :py:obj:`~.cudaSetDevice()` with this device) - cudaComputeModeExclusiveProcess = cyruntime.cudaComputeMode.cudaComputeModeExclusiveProcess{{endif}} + cudaComputeModeExclusiveProcess = ( + cyruntime.cudaComputeMode.cudaComputeModeExclusiveProcess, + 'Compute-exclusive-process mode (Many threads in one process will be able to\n' + 'use :py:obj:`~.cudaSetDevice()` with this device)\n' + ){{endif}} -_dict_cudaComputeMode = dict(((int(v), v) for k, v in cudaComputeMode.__members__.items())) {{endif}} {{if 'cudaLimit' in found_types}} -class cudaLimit(IntEnum): +class cudaLimit(_FastEnum): """ CUDA Limits """ {{if 'cudaLimitStackSize' in found_values}} - #: GPU thread stack size - cudaLimitStackSize = cyruntime.cudaLimit.cudaLimitStackSize{{endif}} + cudaLimitStackSize = ( + cyruntime.cudaLimit.cudaLimitStackSize, + 'GPU thread stack size\n' + ){{endif}} {{if 'cudaLimitPrintfFifoSize' in found_values}} - #: GPU printf FIFO size - cudaLimitPrintfFifoSize = cyruntime.cudaLimit.cudaLimitPrintfFifoSize{{endif}} + cudaLimitPrintfFifoSize = ( + cyruntime.cudaLimit.cudaLimitPrintfFifoSize, + 'GPU printf FIFO size\n' + ){{endif}} {{if 'cudaLimitMallocHeapSize' in found_values}} - #: GPU malloc heap size - cudaLimitMallocHeapSize = cyruntime.cudaLimit.cudaLimitMallocHeapSize{{endif}} + cudaLimitMallocHeapSize = ( + cyruntime.cudaLimit.cudaLimitMallocHeapSize, + 'GPU malloc heap size\n' + ){{endif}} {{if 'cudaLimitDevRuntimeSyncDepth' in found_values}} - #: GPU device runtime synchronize depth - cudaLimitDevRuntimeSyncDepth = cyruntime.cudaLimit.cudaLimitDevRuntimeSyncDepth{{endif}} + cudaLimitDevRuntimeSyncDepth = ( + cyruntime.cudaLimit.cudaLimitDevRuntimeSyncDepth, + 'GPU device runtime synchronize depth\n' + ){{endif}} {{if 'cudaLimitDevRuntimePendingLaunchCount' in found_values}} - #: GPU device runtime pending launch count - cudaLimitDevRuntimePendingLaunchCount = cyruntime.cudaLimit.cudaLimitDevRuntimePendingLaunchCount{{endif}} + cudaLimitDevRuntimePendingLaunchCount = ( + cyruntime.cudaLimit.cudaLimitDevRuntimePendingLaunchCount, + 'GPU device runtime pending launch count\n' + ){{endif}} {{if 'cudaLimitMaxL2FetchGranularity' in found_values}} - #: A value between 0 and 128 that indicates the maximum fetch - #: granularity of L2 (in Bytes). This is a hint - cudaLimitMaxL2FetchGranularity = cyruntime.cudaLimit.cudaLimitMaxL2FetchGranularity{{endif}} + cudaLimitMaxL2FetchGranularity = ( + cyruntime.cudaLimit.cudaLimitMaxL2FetchGranularity, + 'A value between 0 and 128 that indicates the maximum fetch granularity of\n' + 'L2 (in Bytes). This is a hint\n' + ){{endif}} {{if 'cudaLimitPersistingL2CacheSize' in found_values}} - #: A size in bytes for L2 persisting lines cache size - cudaLimitPersistingL2CacheSize = cyruntime.cudaLimit.cudaLimitPersistingL2CacheSize{{endif}} + cudaLimitPersistingL2CacheSize = ( + cyruntime.cudaLimit.cudaLimitPersistingL2CacheSize, + 'A size in bytes for L2 persisting lines cache size\n' + ){{endif}} -_dict_cudaLimit = dict(((int(v), v) for k, v in cudaLimit.__members__.items())) {{endif}} {{if 'cudaMemoryAdvise' in found_types}} -class cudaMemoryAdvise(IntEnum): +class cudaMemoryAdvise(_FastEnum): """ CUDA Memory Advise values """ {{if 'cudaMemAdviseSetReadMostly' in found_values}} - #: Data will mostly be read and only occassionally be written to - cudaMemAdviseSetReadMostly = cyruntime.cudaMemoryAdvise.cudaMemAdviseSetReadMostly{{endif}} + cudaMemAdviseSetReadMostly = ( + cyruntime.cudaMemoryAdvise.cudaMemAdviseSetReadMostly, + 'Data will mostly be read and only occassionally be written to\n' + ){{endif}} {{if 'cudaMemAdviseUnsetReadMostly' in found_values}} - #: Undo the effect of :py:obj:`~.cudaMemAdviseSetReadMostly` - cudaMemAdviseUnsetReadMostly = cyruntime.cudaMemoryAdvise.cudaMemAdviseUnsetReadMostly{{endif}} + cudaMemAdviseUnsetReadMostly = ( + cyruntime.cudaMemoryAdvise.cudaMemAdviseUnsetReadMostly, + 'Undo the effect of :py:obj:`~.cudaMemAdviseSetReadMostly`\n' + ){{endif}} {{if 'cudaMemAdviseSetPreferredLocation' in found_values}} - #: Set the preferred location for the data as the specified device - cudaMemAdviseSetPreferredLocation = cyruntime.cudaMemoryAdvise.cudaMemAdviseSetPreferredLocation{{endif}} + cudaMemAdviseSetPreferredLocation = ( + cyruntime.cudaMemoryAdvise.cudaMemAdviseSetPreferredLocation, + 'Set the preferred location for the data as the specified device\n' + ){{endif}} {{if 'cudaMemAdviseUnsetPreferredLocation' in found_values}} - #: Clear the preferred location for the data - cudaMemAdviseUnsetPreferredLocation = cyruntime.cudaMemoryAdvise.cudaMemAdviseUnsetPreferredLocation{{endif}} + cudaMemAdviseUnsetPreferredLocation = ( + cyruntime.cudaMemoryAdvise.cudaMemAdviseUnsetPreferredLocation, + 'Clear the preferred location for the data\n' + ){{endif}} {{if 'cudaMemAdviseSetAccessedBy' in found_values}} - #: Data will be accessed by the specified device, so prevent page - #: faults as much as possible - cudaMemAdviseSetAccessedBy = cyruntime.cudaMemoryAdvise.cudaMemAdviseSetAccessedBy{{endif}} + cudaMemAdviseSetAccessedBy = ( + cyruntime.cudaMemoryAdvise.cudaMemAdviseSetAccessedBy, + 'Data will be accessed by the specified device, so prevent page faults as\n' + 'much as possible\n' + ){{endif}} {{if 'cudaMemAdviseUnsetAccessedBy' in found_values}} - #: Let the Unified Memory subsystem decide on the page faulting policy - #: for the specified device - cudaMemAdviseUnsetAccessedBy = cyruntime.cudaMemoryAdvise.cudaMemAdviseUnsetAccessedBy{{endif}} + cudaMemAdviseUnsetAccessedBy = ( + cyruntime.cudaMemoryAdvise.cudaMemAdviseUnsetAccessedBy, + 'Let the Unified Memory subsystem decide on the page faulting policy for the\n' + 'specified device\n' + ){{endif}} -_dict_cudaMemoryAdvise = dict(((int(v), v) for k, v in cudaMemoryAdvise.__members__.items())) {{endif}} {{if 'cudaMemRangeAttribute' in found_types}} -class cudaMemRangeAttribute(IntEnum): +class cudaMemRangeAttribute(_FastEnum): """ CUDA range attributes """ {{if 'cudaMemRangeAttributeReadMostly' in found_values}} - #: Whether the range will mostly be read and only occassionally be - #: written to - cudaMemRangeAttributeReadMostly = cyruntime.cudaMemRangeAttribute.cudaMemRangeAttributeReadMostly{{endif}} + cudaMemRangeAttributeReadMostly = ( + cyruntime.cudaMemRangeAttribute.cudaMemRangeAttributeReadMostly, + 'Whether the range will mostly be read and only occassionally be written to\n' + ){{endif}} {{if 'cudaMemRangeAttributePreferredLocation' in found_values}} - #: The preferred location of the range - cudaMemRangeAttributePreferredLocation = cyruntime.cudaMemRangeAttribute.cudaMemRangeAttributePreferredLocation{{endif}} + cudaMemRangeAttributePreferredLocation = ( + cyruntime.cudaMemRangeAttribute.cudaMemRangeAttributePreferredLocation, + 'The preferred location of the range\n' + ){{endif}} {{if 'cudaMemRangeAttributeAccessedBy' in found_values}} - #: Memory range has :py:obj:`~.cudaMemAdviseSetAccessedBy` set for - #: specified device - cudaMemRangeAttributeAccessedBy = cyruntime.cudaMemRangeAttribute.cudaMemRangeAttributeAccessedBy{{endif}} + cudaMemRangeAttributeAccessedBy = ( + cyruntime.cudaMemRangeAttribute.cudaMemRangeAttributeAccessedBy, + 'Memory range has :py:obj:`~.cudaMemAdviseSetAccessedBy` set for specified\n' + 'device\n' + ){{endif}} {{if 'cudaMemRangeAttributeLastPrefetchLocation' in found_values}} - #: The last location to which the range was prefetched - cudaMemRangeAttributeLastPrefetchLocation = cyruntime.cudaMemRangeAttribute.cudaMemRangeAttributeLastPrefetchLocation{{endif}} + cudaMemRangeAttributeLastPrefetchLocation = ( + cyruntime.cudaMemRangeAttribute.cudaMemRangeAttributeLastPrefetchLocation, + 'The last location to which the range was prefetched\n' + ){{endif}} {{if 'cudaMemRangeAttributePreferredLocationType' in found_values}} - #: The preferred location type of the range - cudaMemRangeAttributePreferredLocationType = cyruntime.cudaMemRangeAttribute.cudaMemRangeAttributePreferredLocationType{{endif}} + cudaMemRangeAttributePreferredLocationType = ( + cyruntime.cudaMemRangeAttribute.cudaMemRangeAttributePreferredLocationType, + 'The preferred location type of the range\n' + ){{endif}} {{if 'cudaMemRangeAttributePreferredLocationId' in found_values}} - #: The preferred location id of the range - cudaMemRangeAttributePreferredLocationId = cyruntime.cudaMemRangeAttribute.cudaMemRangeAttributePreferredLocationId{{endif}} + cudaMemRangeAttributePreferredLocationId = ( + cyruntime.cudaMemRangeAttribute.cudaMemRangeAttributePreferredLocationId, + 'The preferred location id of the range\n' + ){{endif}} {{if 'cudaMemRangeAttributeLastPrefetchLocationType' in found_values}} - #: The last location type to which the range was prefetched - cudaMemRangeAttributeLastPrefetchLocationType = cyruntime.cudaMemRangeAttribute.cudaMemRangeAttributeLastPrefetchLocationType{{endif}} + cudaMemRangeAttributeLastPrefetchLocationType = ( + cyruntime.cudaMemRangeAttribute.cudaMemRangeAttributeLastPrefetchLocationType, + 'The last location type to which the range was prefetched\n' + ){{endif}} {{if 'cudaMemRangeAttributeLastPrefetchLocationId' in found_values}} - #: The last location id to which the range was prefetched - cudaMemRangeAttributeLastPrefetchLocationId = cyruntime.cudaMemRangeAttribute.cudaMemRangeAttributeLastPrefetchLocationId{{endif}} + cudaMemRangeAttributeLastPrefetchLocationId = ( + cyruntime.cudaMemRangeAttribute.cudaMemRangeAttributeLastPrefetchLocationId, + 'The last location id to which the range was prefetched\n' + ){{endif}} -_dict_cudaMemRangeAttribute = dict(((int(v), v) for k, v in cudaMemRangeAttribute.__members__.items())) {{endif}} {{if 'cudaFlushGPUDirectRDMAWritesOptions' in found_types}} -class cudaFlushGPUDirectRDMAWritesOptions(IntEnum): +class cudaFlushGPUDirectRDMAWritesOptions(_FastEnum): """ CUDA GPUDirect RDMA flush writes APIs supported on the device """ {{if 'cudaFlushGPUDirectRDMAWritesOptionHost' in found_values}} - #: :py:obj:`~.cudaDeviceFlushGPUDirectRDMAWrites()` and its CUDA Driver - #: API counterpart are supported on the device. - cudaFlushGPUDirectRDMAWritesOptionHost = cyruntime.cudaFlushGPUDirectRDMAWritesOptions.cudaFlushGPUDirectRDMAWritesOptionHost{{endif}} + cudaFlushGPUDirectRDMAWritesOptionHost = ( + cyruntime.cudaFlushGPUDirectRDMAWritesOptions.cudaFlushGPUDirectRDMAWritesOptionHost, + ':py:obj:`~.cudaDeviceFlushGPUDirectRDMAWrites()` and its CUDA Driver API\n' + 'counterpart are supported on the device.\n' + ){{endif}} {{if 'cudaFlushGPUDirectRDMAWritesOptionMemOps' in found_values}} - #: The :py:obj:`~.CU_STREAM_WAIT_VALUE_FLUSH` flag and the - #: :py:obj:`~.CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES` MemOp are supported - #: on the CUDA device. - cudaFlushGPUDirectRDMAWritesOptionMemOps = cyruntime.cudaFlushGPUDirectRDMAWritesOptions.cudaFlushGPUDirectRDMAWritesOptionMemOps{{endif}} + cudaFlushGPUDirectRDMAWritesOptionMemOps = ( + cyruntime.cudaFlushGPUDirectRDMAWritesOptions.cudaFlushGPUDirectRDMAWritesOptionMemOps, + 'The :py:obj:`~.CU_STREAM_WAIT_VALUE_FLUSH` flag and the\n' + ':py:obj:`~.CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES` MemOp are supported on the\n' + 'CUDA device.\n' + ){{endif}} -_dict_cudaFlushGPUDirectRDMAWritesOptions = dict(((int(v), v) for k, v in cudaFlushGPUDirectRDMAWritesOptions.__members__.items())) {{endif}} {{if 'cudaGPUDirectRDMAWritesOrdering' in found_types}} -class cudaGPUDirectRDMAWritesOrdering(IntEnum): +class cudaGPUDirectRDMAWritesOrdering(_FastEnum): """ CUDA GPUDirect RDMA flush writes ordering features of the device """ {{if 'cudaGPUDirectRDMAWritesOrderingNone' in found_values}} - #: The device does not natively support ordering of GPUDirect RDMA - #: writes. :py:obj:`~.cudaFlushGPUDirectRDMAWrites()` can be leveraged - #: if supported. - cudaGPUDirectRDMAWritesOrderingNone = cyruntime.cudaGPUDirectRDMAWritesOrdering.cudaGPUDirectRDMAWritesOrderingNone{{endif}} + cudaGPUDirectRDMAWritesOrderingNone = ( + cyruntime.cudaGPUDirectRDMAWritesOrdering.cudaGPUDirectRDMAWritesOrderingNone, + 'The device does not natively support ordering of GPUDirect RDMA writes.\n' + ':py:obj:`~.cudaFlushGPUDirectRDMAWrites()` can be leveraged if supported.\n' + ){{endif}} {{if 'cudaGPUDirectRDMAWritesOrderingOwner' in found_values}} - #: Natively, the device can consistently consume GPUDirect RDMA writes, - #: although other CUDA devices may not. - cudaGPUDirectRDMAWritesOrderingOwner = cyruntime.cudaGPUDirectRDMAWritesOrdering.cudaGPUDirectRDMAWritesOrderingOwner{{endif}} + cudaGPUDirectRDMAWritesOrderingOwner = ( + cyruntime.cudaGPUDirectRDMAWritesOrdering.cudaGPUDirectRDMAWritesOrderingOwner, + 'Natively, the device can consistently consume GPUDirect RDMA writes,\n' + 'although other CUDA devices may not.\n' + ){{endif}} {{if 'cudaGPUDirectRDMAWritesOrderingAllDevices' in found_values}} - #: Any CUDA device in the system can consistently consume GPUDirect - #: RDMA writes to this device. - cudaGPUDirectRDMAWritesOrderingAllDevices = cyruntime.cudaGPUDirectRDMAWritesOrdering.cudaGPUDirectRDMAWritesOrderingAllDevices{{endif}} + cudaGPUDirectRDMAWritesOrderingAllDevices = ( + cyruntime.cudaGPUDirectRDMAWritesOrdering.cudaGPUDirectRDMAWritesOrderingAllDevices, + 'Any CUDA device in the system can consistently consume GPUDirect RDMA\n' + 'writes to this device.\n' + ){{endif}} -_dict_cudaGPUDirectRDMAWritesOrdering = dict(((int(v), v) for k, v in cudaGPUDirectRDMAWritesOrdering.__members__.items())) {{endif}} {{if 'cudaFlushGPUDirectRDMAWritesScope' in found_types}} -class cudaFlushGPUDirectRDMAWritesScope(IntEnum): +class cudaFlushGPUDirectRDMAWritesScope(_FastEnum): """ CUDA GPUDirect RDMA flush writes scopes """ {{if 'cudaFlushGPUDirectRDMAWritesToOwner' in found_values}} - #: Blocks until remote writes are visible to the CUDA device context - #: owning the data. - cudaFlushGPUDirectRDMAWritesToOwner = cyruntime.cudaFlushGPUDirectRDMAWritesScope.cudaFlushGPUDirectRDMAWritesToOwner{{endif}} + cudaFlushGPUDirectRDMAWritesToOwner = ( + cyruntime.cudaFlushGPUDirectRDMAWritesScope.cudaFlushGPUDirectRDMAWritesToOwner, + 'Blocks until remote writes are visible to the CUDA device context owning\n' + 'the data.\n' + ){{endif}} {{if 'cudaFlushGPUDirectRDMAWritesToAllDevices' in found_values}} - #: Blocks until remote writes are visible to all CUDA device contexts. - cudaFlushGPUDirectRDMAWritesToAllDevices = cyruntime.cudaFlushGPUDirectRDMAWritesScope.cudaFlushGPUDirectRDMAWritesToAllDevices{{endif}} + cudaFlushGPUDirectRDMAWritesToAllDevices = ( + cyruntime.cudaFlushGPUDirectRDMAWritesScope.cudaFlushGPUDirectRDMAWritesToAllDevices, + 'Blocks until remote writes are visible to all CUDA device contexts.\n' + ){{endif}} -_dict_cudaFlushGPUDirectRDMAWritesScope = dict(((int(v), v) for k, v in cudaFlushGPUDirectRDMAWritesScope.__members__.items())) {{endif}} {{if 'cudaFlushGPUDirectRDMAWritesTarget' in found_types}} -class cudaFlushGPUDirectRDMAWritesTarget(IntEnum): +class cudaFlushGPUDirectRDMAWritesTarget(_FastEnum): """ CUDA GPUDirect RDMA flush writes targets """ {{if 'cudaFlushGPUDirectRDMAWritesTargetCurrentDevice' in found_values}} - #: Sets the target for :py:obj:`~.cudaDeviceFlushGPUDirectRDMAWrites()` - #: to the currently active CUDA device context. - cudaFlushGPUDirectRDMAWritesTargetCurrentDevice = cyruntime.cudaFlushGPUDirectRDMAWritesTarget.cudaFlushGPUDirectRDMAWritesTargetCurrentDevice{{endif}} + cudaFlushGPUDirectRDMAWritesTargetCurrentDevice = ( + cyruntime.cudaFlushGPUDirectRDMAWritesTarget.cudaFlushGPUDirectRDMAWritesTargetCurrentDevice, + 'Sets the target for :py:obj:`~.cudaDeviceFlushGPUDirectRDMAWrites()` to the\n' + 'currently active CUDA device context.\n' + ){{endif}} -_dict_cudaFlushGPUDirectRDMAWritesTarget = dict(((int(v), v) for k, v in cudaFlushGPUDirectRDMAWritesTarget.__members__.items())) {{endif}} {{if 'cudaDeviceAttr' in found_types}} -class cudaDeviceAttr(IntEnum): +class cudaDeviceAttr(_FastEnum): """ CUDA device attributes """ {{if 'cudaDevAttrMaxThreadsPerBlock' in found_values}} - #: Maximum number of threads per block - cudaDevAttrMaxThreadsPerBlock = cyruntime.cudaDeviceAttr.cudaDevAttrMaxThreadsPerBlock{{endif}} + cudaDevAttrMaxThreadsPerBlock = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxThreadsPerBlock, + 'Maximum number of threads per block\n' + ){{endif}} {{if 'cudaDevAttrMaxBlockDimX' in found_values}} - #: Maximum block dimension X - cudaDevAttrMaxBlockDimX = cyruntime.cudaDeviceAttr.cudaDevAttrMaxBlockDimX{{endif}} + cudaDevAttrMaxBlockDimX = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxBlockDimX, + 'Maximum block dimension X\n' + ){{endif}} {{if 'cudaDevAttrMaxBlockDimY' in found_values}} - #: Maximum block dimension Y - cudaDevAttrMaxBlockDimY = cyruntime.cudaDeviceAttr.cudaDevAttrMaxBlockDimY{{endif}} + cudaDevAttrMaxBlockDimY = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxBlockDimY, + 'Maximum block dimension Y\n' + ){{endif}} {{if 'cudaDevAttrMaxBlockDimZ' in found_values}} - #: Maximum block dimension Z - cudaDevAttrMaxBlockDimZ = cyruntime.cudaDeviceAttr.cudaDevAttrMaxBlockDimZ{{endif}} + cudaDevAttrMaxBlockDimZ = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxBlockDimZ, + 'Maximum block dimension Z\n' + ){{endif}} {{if 'cudaDevAttrMaxGridDimX' in found_values}} - #: Maximum grid dimension X - cudaDevAttrMaxGridDimX = cyruntime.cudaDeviceAttr.cudaDevAttrMaxGridDimX{{endif}} + cudaDevAttrMaxGridDimX = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxGridDimX, + 'Maximum grid dimension X\n' + ){{endif}} {{if 'cudaDevAttrMaxGridDimY' in found_values}} - #: Maximum grid dimension Y - cudaDevAttrMaxGridDimY = cyruntime.cudaDeviceAttr.cudaDevAttrMaxGridDimY{{endif}} + cudaDevAttrMaxGridDimY = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxGridDimY, + 'Maximum grid dimension Y\n' + ){{endif}} {{if 'cudaDevAttrMaxGridDimZ' in found_values}} - #: Maximum grid dimension Z - cudaDevAttrMaxGridDimZ = cyruntime.cudaDeviceAttr.cudaDevAttrMaxGridDimZ{{endif}} + cudaDevAttrMaxGridDimZ = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxGridDimZ, + 'Maximum grid dimension Z\n' + ){{endif}} {{if 'cudaDevAttrMaxSharedMemoryPerBlock' in found_values}} - #: Maximum shared memory available per block in bytes - cudaDevAttrMaxSharedMemoryPerBlock = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSharedMemoryPerBlock{{endif}} + cudaDevAttrMaxSharedMemoryPerBlock = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxSharedMemoryPerBlock, + 'Maximum shared memory available per block in bytes\n' + ){{endif}} {{if 'cudaDevAttrTotalConstantMemory' in found_values}} - #: Memory available on device for constant variables in a CUDA C kernel - #: in bytes - cudaDevAttrTotalConstantMemory = cyruntime.cudaDeviceAttr.cudaDevAttrTotalConstantMemory{{endif}} + cudaDevAttrTotalConstantMemory = ( + cyruntime.cudaDeviceAttr.cudaDevAttrTotalConstantMemory, + 'Memory available on device for constant variables in a CUDA C kernel in\n' + 'bytes\n' + ){{endif}} {{if 'cudaDevAttrWarpSize' in found_values}} - #: Warp size in threads - cudaDevAttrWarpSize = cyruntime.cudaDeviceAttr.cudaDevAttrWarpSize{{endif}} + cudaDevAttrWarpSize = ( + cyruntime.cudaDeviceAttr.cudaDevAttrWarpSize, + 'Warp size in threads\n' + ){{endif}} {{if 'cudaDevAttrMaxPitch' in found_values}} - #: Maximum pitch in bytes allowed by memory copies - cudaDevAttrMaxPitch = cyruntime.cudaDeviceAttr.cudaDevAttrMaxPitch{{endif}} + cudaDevAttrMaxPitch = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxPitch, + 'Maximum pitch in bytes allowed by memory copies\n' + ){{endif}} {{if 'cudaDevAttrMaxRegistersPerBlock' in found_values}} - #: Maximum number of 32-bit registers available per block - cudaDevAttrMaxRegistersPerBlock = cyruntime.cudaDeviceAttr.cudaDevAttrMaxRegistersPerBlock{{endif}} + cudaDevAttrMaxRegistersPerBlock = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxRegistersPerBlock, + 'Maximum number of 32-bit registers available per block\n' + ){{endif}} {{if 'cudaDevAttrClockRate' in found_values}} - #: Peak clock frequency in kilohertz - cudaDevAttrClockRate = cyruntime.cudaDeviceAttr.cudaDevAttrClockRate{{endif}} + cudaDevAttrClockRate = ( + cyruntime.cudaDeviceAttr.cudaDevAttrClockRate, + 'Peak clock frequency in kilohertz\n' + ){{endif}} {{if 'cudaDevAttrTextureAlignment' in found_values}} - #: Alignment requirement for textures - cudaDevAttrTextureAlignment = cyruntime.cudaDeviceAttr.cudaDevAttrTextureAlignment{{endif}} + cudaDevAttrTextureAlignment = ( + cyruntime.cudaDeviceAttr.cudaDevAttrTextureAlignment, + 'Alignment requirement for textures\n' + ){{endif}} {{if 'cudaDevAttrGpuOverlap' in found_values}} - #: Device can possibly copy memory and execute a kernel concurrently - cudaDevAttrGpuOverlap = cyruntime.cudaDeviceAttr.cudaDevAttrGpuOverlap{{endif}} + cudaDevAttrGpuOverlap = ( + cyruntime.cudaDeviceAttr.cudaDevAttrGpuOverlap, + 'Device can possibly copy memory and execute a kernel concurrently\n' + ){{endif}} {{if 'cudaDevAttrMultiProcessorCount' in found_values}} - #: Number of multiprocessors on device - cudaDevAttrMultiProcessorCount = cyruntime.cudaDeviceAttr.cudaDevAttrMultiProcessorCount{{endif}} + cudaDevAttrMultiProcessorCount = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMultiProcessorCount, + 'Number of multiprocessors on device\n' + ){{endif}} {{if 'cudaDevAttrKernelExecTimeout' in found_values}} - #: Specifies whether there is a run time limit on kernels - cudaDevAttrKernelExecTimeout = cyruntime.cudaDeviceAttr.cudaDevAttrKernelExecTimeout{{endif}} + cudaDevAttrKernelExecTimeout = ( + cyruntime.cudaDeviceAttr.cudaDevAttrKernelExecTimeout, + 'Specifies whether there is a run time limit on kernels\n' + ){{endif}} {{if 'cudaDevAttrIntegrated' in found_values}} - #: Device is integrated with host memory - cudaDevAttrIntegrated = cyruntime.cudaDeviceAttr.cudaDevAttrIntegrated{{endif}} + cudaDevAttrIntegrated = ( + cyruntime.cudaDeviceAttr.cudaDevAttrIntegrated, + 'Device is integrated with host memory\n' + ){{endif}} {{if 'cudaDevAttrCanMapHostMemory' in found_values}} - #: Device can map host memory into CUDA address space - cudaDevAttrCanMapHostMemory = cyruntime.cudaDeviceAttr.cudaDevAttrCanMapHostMemory{{endif}} + cudaDevAttrCanMapHostMemory = ( + cyruntime.cudaDeviceAttr.cudaDevAttrCanMapHostMemory, + 'Device can map host memory into CUDA address space\n' + ){{endif}} {{if 'cudaDevAttrComputeMode' in found_values}} - #: Compute mode (See :py:obj:`~.cudaComputeMode` for details) - cudaDevAttrComputeMode = cyruntime.cudaDeviceAttr.cudaDevAttrComputeMode{{endif}} + cudaDevAttrComputeMode = ( + cyruntime.cudaDeviceAttr.cudaDevAttrComputeMode, + 'Compute mode (See :py:obj:`~.cudaComputeMode` for details)\n' + ){{endif}} {{if 'cudaDevAttrMaxTexture1DWidth' in found_values}} - #: Maximum 1D texture width - cudaDevAttrMaxTexture1DWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture1DWidth{{endif}} + cudaDevAttrMaxTexture1DWidth = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture1DWidth, + 'Maximum 1D texture width\n' + ){{endif}} {{if 'cudaDevAttrMaxTexture2DWidth' in found_values}} - #: Maximum 2D texture width - cudaDevAttrMaxTexture2DWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DWidth{{endif}} + cudaDevAttrMaxTexture2DWidth = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DWidth, + 'Maximum 2D texture width\n' + ){{endif}} {{if 'cudaDevAttrMaxTexture2DHeight' in found_values}} - #: Maximum 2D texture height - cudaDevAttrMaxTexture2DHeight = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DHeight{{endif}} + cudaDevAttrMaxTexture2DHeight = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DHeight, + 'Maximum 2D texture height\n' + ){{endif}} {{if 'cudaDevAttrMaxTexture3DWidth' in found_values}} - #: Maximum 3D texture width - cudaDevAttrMaxTexture3DWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture3DWidth{{endif}} + cudaDevAttrMaxTexture3DWidth = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture3DWidth, + 'Maximum 3D texture width\n' + ){{endif}} {{if 'cudaDevAttrMaxTexture3DHeight' in found_values}} - #: Maximum 3D texture height - cudaDevAttrMaxTexture3DHeight = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture3DHeight{{endif}} + cudaDevAttrMaxTexture3DHeight = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture3DHeight, + 'Maximum 3D texture height\n' + ){{endif}} {{if 'cudaDevAttrMaxTexture3DDepth' in found_values}} - #: Maximum 3D texture depth - cudaDevAttrMaxTexture3DDepth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture3DDepth{{endif}} + cudaDevAttrMaxTexture3DDepth = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture3DDepth, + 'Maximum 3D texture depth\n' + ){{endif}} {{if 'cudaDevAttrMaxTexture2DLayeredWidth' in found_values}} - #: Maximum 2D layered texture width - cudaDevAttrMaxTexture2DLayeredWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLayeredWidth{{endif}} + cudaDevAttrMaxTexture2DLayeredWidth = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLayeredWidth, + 'Maximum 2D layered texture width\n' + ){{endif}} {{if 'cudaDevAttrMaxTexture2DLayeredHeight' in found_values}} - #: Maximum 2D layered texture height - cudaDevAttrMaxTexture2DLayeredHeight = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLayeredHeight{{endif}} + cudaDevAttrMaxTexture2DLayeredHeight = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLayeredHeight, + 'Maximum 2D layered texture height\n' + ){{endif}} {{if 'cudaDevAttrMaxTexture2DLayeredLayers' in found_values}} - #: Maximum layers in a 2D layered texture - cudaDevAttrMaxTexture2DLayeredLayers = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLayeredLayers{{endif}} + cudaDevAttrMaxTexture2DLayeredLayers = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLayeredLayers, + 'Maximum layers in a 2D layered texture\n' + ){{endif}} {{if 'cudaDevAttrSurfaceAlignment' in found_values}} - #: Alignment requirement for surfaces - cudaDevAttrSurfaceAlignment = cyruntime.cudaDeviceAttr.cudaDevAttrSurfaceAlignment{{endif}} + cudaDevAttrSurfaceAlignment = ( + cyruntime.cudaDeviceAttr.cudaDevAttrSurfaceAlignment, + 'Alignment requirement for surfaces\n' + ){{endif}} {{if 'cudaDevAttrConcurrentKernels' in found_values}} - #: Device can possibly execute multiple kernels concurrently - cudaDevAttrConcurrentKernels = cyruntime.cudaDeviceAttr.cudaDevAttrConcurrentKernels{{endif}} + cudaDevAttrConcurrentKernels = ( + cyruntime.cudaDeviceAttr.cudaDevAttrConcurrentKernels, + 'Device can possibly execute multiple kernels concurrently\n' + ){{endif}} {{if 'cudaDevAttrEccEnabled' in found_values}} - #: Device has ECC support enabled - cudaDevAttrEccEnabled = cyruntime.cudaDeviceAttr.cudaDevAttrEccEnabled{{endif}} + cudaDevAttrEccEnabled = ( + cyruntime.cudaDeviceAttr.cudaDevAttrEccEnabled, + 'Device has ECC support enabled\n' + ){{endif}} {{if 'cudaDevAttrPciBusId' in found_values}} - #: PCI bus ID of the device - cudaDevAttrPciBusId = cyruntime.cudaDeviceAttr.cudaDevAttrPciBusId{{endif}} + cudaDevAttrPciBusId = ( + cyruntime.cudaDeviceAttr.cudaDevAttrPciBusId, + 'PCI bus ID of the device\n' + ){{endif}} {{if 'cudaDevAttrPciDeviceId' in found_values}} - #: PCI device ID of the device - cudaDevAttrPciDeviceId = cyruntime.cudaDeviceAttr.cudaDevAttrPciDeviceId{{endif}} + cudaDevAttrPciDeviceId = ( + cyruntime.cudaDeviceAttr.cudaDevAttrPciDeviceId, + 'PCI device ID of the device\n' + ){{endif}} {{if 'cudaDevAttrTccDriver' in found_values}} - #: Device is using TCC driver model - cudaDevAttrTccDriver = cyruntime.cudaDeviceAttr.cudaDevAttrTccDriver{{endif}} + cudaDevAttrTccDriver = ( + cyruntime.cudaDeviceAttr.cudaDevAttrTccDriver, + 'Device is using TCC driver model\n' + ){{endif}} {{if 'cudaDevAttrMemoryClockRate' in found_values}} - #: Peak memory clock frequency in kilohertz - cudaDevAttrMemoryClockRate = cyruntime.cudaDeviceAttr.cudaDevAttrMemoryClockRate{{endif}} + cudaDevAttrMemoryClockRate = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMemoryClockRate, + 'Peak memory clock frequency in kilohertz\n' + ){{endif}} {{if 'cudaDevAttrGlobalMemoryBusWidth' in found_values}} - #: Global memory bus width in bits - cudaDevAttrGlobalMemoryBusWidth = cyruntime.cudaDeviceAttr.cudaDevAttrGlobalMemoryBusWidth{{endif}} + cudaDevAttrGlobalMemoryBusWidth = ( + cyruntime.cudaDeviceAttr.cudaDevAttrGlobalMemoryBusWidth, + 'Global memory bus width in bits\n' + ){{endif}} {{if 'cudaDevAttrL2CacheSize' in found_values}} - #: Size of L2 cache in bytes - cudaDevAttrL2CacheSize = cyruntime.cudaDeviceAttr.cudaDevAttrL2CacheSize{{endif}} + cudaDevAttrL2CacheSize = ( + cyruntime.cudaDeviceAttr.cudaDevAttrL2CacheSize, + 'Size of L2 cache in bytes\n' + ){{endif}} {{if 'cudaDevAttrMaxThreadsPerMultiProcessor' in found_values}} - #: Maximum resident threads per multiprocessor - cudaDevAttrMaxThreadsPerMultiProcessor = cyruntime.cudaDeviceAttr.cudaDevAttrMaxThreadsPerMultiProcessor{{endif}} + cudaDevAttrMaxThreadsPerMultiProcessor = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxThreadsPerMultiProcessor, + 'Maximum resident threads per multiprocessor\n' + ){{endif}} {{if 'cudaDevAttrAsyncEngineCount' in found_values}} - #: Number of asynchronous engines - cudaDevAttrAsyncEngineCount = cyruntime.cudaDeviceAttr.cudaDevAttrAsyncEngineCount{{endif}} + cudaDevAttrAsyncEngineCount = ( + cyruntime.cudaDeviceAttr.cudaDevAttrAsyncEngineCount, + 'Number of asynchronous engines\n' + ){{endif}} {{if 'cudaDevAttrUnifiedAddressing' in found_values}} - #: Device shares a unified address space with the host - cudaDevAttrUnifiedAddressing = cyruntime.cudaDeviceAttr.cudaDevAttrUnifiedAddressing{{endif}} + cudaDevAttrUnifiedAddressing = ( + cyruntime.cudaDeviceAttr.cudaDevAttrUnifiedAddressing, + 'Device shares a unified address space with the host\n' + ){{endif}} {{if 'cudaDevAttrMaxTexture1DLayeredWidth' in found_values}} - #: Maximum 1D layered texture width - cudaDevAttrMaxTexture1DLayeredWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture1DLayeredWidth{{endif}} + cudaDevAttrMaxTexture1DLayeredWidth = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture1DLayeredWidth, + 'Maximum 1D layered texture width\n' + ){{endif}} {{if 'cudaDevAttrMaxTexture1DLayeredLayers' in found_values}} - #: Maximum layers in a 1D layered texture - cudaDevAttrMaxTexture1DLayeredLayers = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture1DLayeredLayers{{endif}} + cudaDevAttrMaxTexture1DLayeredLayers = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture1DLayeredLayers, + 'Maximum layers in a 1D layered texture\n' + ){{endif}} {{if 'cudaDevAttrMaxTexture2DGatherWidth' in found_values}} - #: Maximum 2D texture width if cudaArrayTextureGather is set - cudaDevAttrMaxTexture2DGatherWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DGatherWidth{{endif}} + cudaDevAttrMaxTexture2DGatherWidth = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DGatherWidth, + 'Maximum 2D texture width if cudaArrayTextureGather is set\n' + ){{endif}} {{if 'cudaDevAttrMaxTexture2DGatherHeight' in found_values}} - #: Maximum 2D texture height if cudaArrayTextureGather is set - cudaDevAttrMaxTexture2DGatherHeight = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DGatherHeight{{endif}} + cudaDevAttrMaxTexture2DGatherHeight = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DGatherHeight, + 'Maximum 2D texture height if cudaArrayTextureGather is set\n' + ){{endif}} {{if 'cudaDevAttrMaxTexture3DWidthAlt' in found_values}} - #: Alternate maximum 3D texture width - cudaDevAttrMaxTexture3DWidthAlt = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture3DWidthAlt{{endif}} + cudaDevAttrMaxTexture3DWidthAlt = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture3DWidthAlt, + 'Alternate maximum 3D texture width\n' + ){{endif}} {{if 'cudaDevAttrMaxTexture3DHeightAlt' in found_values}} - #: Alternate maximum 3D texture height - cudaDevAttrMaxTexture3DHeightAlt = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture3DHeightAlt{{endif}} + cudaDevAttrMaxTexture3DHeightAlt = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture3DHeightAlt, + 'Alternate maximum 3D texture height\n' + ){{endif}} {{if 'cudaDevAttrMaxTexture3DDepthAlt' in found_values}} - #: Alternate maximum 3D texture depth - cudaDevAttrMaxTexture3DDepthAlt = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture3DDepthAlt{{endif}} + cudaDevAttrMaxTexture3DDepthAlt = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture3DDepthAlt, + 'Alternate maximum 3D texture depth\n' + ){{endif}} {{if 'cudaDevAttrPciDomainId' in found_values}} - #: PCI domain ID of the device - cudaDevAttrPciDomainId = cyruntime.cudaDeviceAttr.cudaDevAttrPciDomainId{{endif}} + cudaDevAttrPciDomainId = ( + cyruntime.cudaDeviceAttr.cudaDevAttrPciDomainId, + 'PCI domain ID of the device\n' + ){{endif}} {{if 'cudaDevAttrTexturePitchAlignment' in found_values}} - #: Pitch alignment requirement for textures - cudaDevAttrTexturePitchAlignment = cyruntime.cudaDeviceAttr.cudaDevAttrTexturePitchAlignment{{endif}} + cudaDevAttrTexturePitchAlignment = ( + cyruntime.cudaDeviceAttr.cudaDevAttrTexturePitchAlignment, + 'Pitch alignment requirement for textures\n' + ){{endif}} {{if 'cudaDevAttrMaxTextureCubemapWidth' in found_values}} - #: Maximum cubemap texture width/height - cudaDevAttrMaxTextureCubemapWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTextureCubemapWidth{{endif}} + cudaDevAttrMaxTextureCubemapWidth = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxTextureCubemapWidth, + 'Maximum cubemap texture width/height\n' + ){{endif}} {{if 'cudaDevAttrMaxTextureCubemapLayeredWidth' in found_values}} - #: Maximum cubemap layered texture width/height - cudaDevAttrMaxTextureCubemapLayeredWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTextureCubemapLayeredWidth{{endif}} + cudaDevAttrMaxTextureCubemapLayeredWidth = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxTextureCubemapLayeredWidth, + 'Maximum cubemap layered texture width/height\n' + ){{endif}} {{if 'cudaDevAttrMaxTextureCubemapLayeredLayers' in found_values}} - #: Maximum layers in a cubemap layered texture - cudaDevAttrMaxTextureCubemapLayeredLayers = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTextureCubemapLayeredLayers{{endif}} + cudaDevAttrMaxTextureCubemapLayeredLayers = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxTextureCubemapLayeredLayers, + 'Maximum layers in a cubemap layered texture\n' + ){{endif}} {{if 'cudaDevAttrMaxSurface1DWidth' in found_values}} - #: Maximum 1D surface width - cudaDevAttrMaxSurface1DWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface1DWidth{{endif}} + cudaDevAttrMaxSurface1DWidth = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface1DWidth, + 'Maximum 1D surface width\n' + ){{endif}} {{if 'cudaDevAttrMaxSurface2DWidth' in found_values}} - #: Maximum 2D surface width - cudaDevAttrMaxSurface2DWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface2DWidth{{endif}} + cudaDevAttrMaxSurface2DWidth = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface2DWidth, + 'Maximum 2D surface width\n' + ){{endif}} {{if 'cudaDevAttrMaxSurface2DHeight' in found_values}} - #: Maximum 2D surface height - cudaDevAttrMaxSurface2DHeight = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface2DHeight{{endif}} + cudaDevAttrMaxSurface2DHeight = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface2DHeight, + 'Maximum 2D surface height\n' + ){{endif}} {{if 'cudaDevAttrMaxSurface3DWidth' in found_values}} - #: Maximum 3D surface width - cudaDevAttrMaxSurface3DWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface3DWidth{{endif}} + cudaDevAttrMaxSurface3DWidth = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface3DWidth, + 'Maximum 3D surface width\n' + ){{endif}} {{if 'cudaDevAttrMaxSurface3DHeight' in found_values}} - #: Maximum 3D surface height - cudaDevAttrMaxSurface3DHeight = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface3DHeight{{endif}} + cudaDevAttrMaxSurface3DHeight = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface3DHeight, + 'Maximum 3D surface height\n' + ){{endif}} {{if 'cudaDevAttrMaxSurface3DDepth' in found_values}} - #: Maximum 3D surface depth - cudaDevAttrMaxSurface3DDepth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface3DDepth{{endif}} + cudaDevAttrMaxSurface3DDepth = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface3DDepth, + 'Maximum 3D surface depth\n' + ){{endif}} {{if 'cudaDevAttrMaxSurface1DLayeredWidth' in found_values}} - #: Maximum 1D layered surface width - cudaDevAttrMaxSurface1DLayeredWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface1DLayeredWidth{{endif}} + cudaDevAttrMaxSurface1DLayeredWidth = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface1DLayeredWidth, + 'Maximum 1D layered surface width\n' + ){{endif}} {{if 'cudaDevAttrMaxSurface1DLayeredLayers' in found_values}} - #: Maximum layers in a 1D layered surface - cudaDevAttrMaxSurface1DLayeredLayers = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface1DLayeredLayers{{endif}} + cudaDevAttrMaxSurface1DLayeredLayers = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface1DLayeredLayers, + 'Maximum layers in a 1D layered surface\n' + ){{endif}} {{if 'cudaDevAttrMaxSurface2DLayeredWidth' in found_values}} - #: Maximum 2D layered surface width - cudaDevAttrMaxSurface2DLayeredWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface2DLayeredWidth{{endif}} + cudaDevAttrMaxSurface2DLayeredWidth = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface2DLayeredWidth, + 'Maximum 2D layered surface width\n' + ){{endif}} {{if 'cudaDevAttrMaxSurface2DLayeredHeight' in found_values}} - #: Maximum 2D layered surface height - cudaDevAttrMaxSurface2DLayeredHeight = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface2DLayeredHeight{{endif}} + cudaDevAttrMaxSurface2DLayeredHeight = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface2DLayeredHeight, + 'Maximum 2D layered surface height\n' + ){{endif}} {{if 'cudaDevAttrMaxSurface2DLayeredLayers' in found_values}} - #: Maximum layers in a 2D layered surface - cudaDevAttrMaxSurface2DLayeredLayers = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface2DLayeredLayers{{endif}} + cudaDevAttrMaxSurface2DLayeredLayers = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurface2DLayeredLayers, + 'Maximum layers in a 2D layered surface\n' + ){{endif}} {{if 'cudaDevAttrMaxSurfaceCubemapWidth' in found_values}} - #: Maximum cubemap surface width - cudaDevAttrMaxSurfaceCubemapWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurfaceCubemapWidth{{endif}} + cudaDevAttrMaxSurfaceCubemapWidth = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurfaceCubemapWidth, + 'Maximum cubemap surface width\n' + ){{endif}} {{if 'cudaDevAttrMaxSurfaceCubemapLayeredWidth' in found_values}} - #: Maximum cubemap layered surface width - cudaDevAttrMaxSurfaceCubemapLayeredWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurfaceCubemapLayeredWidth{{endif}} + cudaDevAttrMaxSurfaceCubemapLayeredWidth = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurfaceCubemapLayeredWidth, + 'Maximum cubemap layered surface width\n' + ){{endif}} {{if 'cudaDevAttrMaxSurfaceCubemapLayeredLayers' in found_values}} - #: Maximum layers in a cubemap layered surface - cudaDevAttrMaxSurfaceCubemapLayeredLayers = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurfaceCubemapLayeredLayers{{endif}} + cudaDevAttrMaxSurfaceCubemapLayeredLayers = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxSurfaceCubemapLayeredLayers, + 'Maximum layers in a cubemap layered surface\n' + ){{endif}} {{if 'cudaDevAttrMaxTexture1DLinearWidth' in found_values}} - #: Maximum 1D linear texture width - cudaDevAttrMaxTexture1DLinearWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture1DLinearWidth{{endif}} + cudaDevAttrMaxTexture1DLinearWidth = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture1DLinearWidth, + 'Maximum 1D linear texture width\n' + ){{endif}} {{if 'cudaDevAttrMaxTexture2DLinearWidth' in found_values}} - #: Maximum 2D linear texture width - cudaDevAttrMaxTexture2DLinearWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLinearWidth{{endif}} + cudaDevAttrMaxTexture2DLinearWidth = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLinearWidth, + 'Maximum 2D linear texture width\n' + ){{endif}} {{if 'cudaDevAttrMaxTexture2DLinearHeight' in found_values}} - #: Maximum 2D linear texture height - cudaDevAttrMaxTexture2DLinearHeight = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLinearHeight{{endif}} + cudaDevAttrMaxTexture2DLinearHeight = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLinearHeight, + 'Maximum 2D linear texture height\n' + ){{endif}} {{if 'cudaDevAttrMaxTexture2DLinearPitch' in found_values}} - #: Maximum 2D linear texture pitch in bytes - cudaDevAttrMaxTexture2DLinearPitch = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLinearPitch{{endif}} + cudaDevAttrMaxTexture2DLinearPitch = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DLinearPitch, + 'Maximum 2D linear texture pitch in bytes\n' + ){{endif}} {{if 'cudaDevAttrMaxTexture2DMipmappedWidth' in found_values}} - #: Maximum mipmapped 2D texture width - cudaDevAttrMaxTexture2DMipmappedWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DMipmappedWidth{{endif}} + cudaDevAttrMaxTexture2DMipmappedWidth = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DMipmappedWidth, + 'Maximum mipmapped 2D texture width\n' + ){{endif}} {{if 'cudaDevAttrMaxTexture2DMipmappedHeight' in found_values}} - #: Maximum mipmapped 2D texture height - cudaDevAttrMaxTexture2DMipmappedHeight = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DMipmappedHeight{{endif}} + cudaDevAttrMaxTexture2DMipmappedHeight = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture2DMipmappedHeight, + 'Maximum mipmapped 2D texture height\n' + ){{endif}} {{if 'cudaDevAttrComputeCapabilityMajor' in found_values}} - #: Major compute capability version number - cudaDevAttrComputeCapabilityMajor = cyruntime.cudaDeviceAttr.cudaDevAttrComputeCapabilityMajor{{endif}} + cudaDevAttrComputeCapabilityMajor = ( + cyruntime.cudaDeviceAttr.cudaDevAttrComputeCapabilityMajor, + 'Major compute capability version number\n' + ){{endif}} {{if 'cudaDevAttrComputeCapabilityMinor' in found_values}} - #: Minor compute capability version number - cudaDevAttrComputeCapabilityMinor = cyruntime.cudaDeviceAttr.cudaDevAttrComputeCapabilityMinor{{endif}} + cudaDevAttrComputeCapabilityMinor = ( + cyruntime.cudaDeviceAttr.cudaDevAttrComputeCapabilityMinor, + 'Minor compute capability version number\n' + ){{endif}} {{if 'cudaDevAttrMaxTexture1DMipmappedWidth' in found_values}} - #: Maximum mipmapped 1D texture width - cudaDevAttrMaxTexture1DMipmappedWidth = cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture1DMipmappedWidth{{endif}} + cudaDevAttrMaxTexture1DMipmappedWidth = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxTexture1DMipmappedWidth, + 'Maximum mipmapped 1D texture width\n' + ){{endif}} {{if 'cudaDevAttrStreamPrioritiesSupported' in found_values}} - #: Device supports stream priorities - cudaDevAttrStreamPrioritiesSupported = cyruntime.cudaDeviceAttr.cudaDevAttrStreamPrioritiesSupported{{endif}} + cudaDevAttrStreamPrioritiesSupported = ( + cyruntime.cudaDeviceAttr.cudaDevAttrStreamPrioritiesSupported, + 'Device supports stream priorities\n' + ){{endif}} {{if 'cudaDevAttrGlobalL1CacheSupported' in found_values}} - #: Device supports caching globals in L1 - cudaDevAttrGlobalL1CacheSupported = cyruntime.cudaDeviceAttr.cudaDevAttrGlobalL1CacheSupported{{endif}} + cudaDevAttrGlobalL1CacheSupported = ( + cyruntime.cudaDeviceAttr.cudaDevAttrGlobalL1CacheSupported, + 'Device supports caching globals in L1\n' + ){{endif}} {{if 'cudaDevAttrLocalL1CacheSupported' in found_values}} - #: Device supports caching locals in L1 - cudaDevAttrLocalL1CacheSupported = cyruntime.cudaDeviceAttr.cudaDevAttrLocalL1CacheSupported{{endif}} + cudaDevAttrLocalL1CacheSupported = ( + cyruntime.cudaDeviceAttr.cudaDevAttrLocalL1CacheSupported, + 'Device supports caching locals in L1\n' + ){{endif}} {{if 'cudaDevAttrMaxSharedMemoryPerMultiprocessor' in found_values}} - #: Maximum shared memory available per multiprocessor in bytes - cudaDevAttrMaxSharedMemoryPerMultiprocessor = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSharedMemoryPerMultiprocessor{{endif}} + cudaDevAttrMaxSharedMemoryPerMultiprocessor = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxSharedMemoryPerMultiprocessor, + 'Maximum shared memory available per multiprocessor in bytes\n' + ){{endif}} {{if 'cudaDevAttrMaxRegistersPerMultiprocessor' in found_values}} - #: Maximum number of 32-bit registers available per multiprocessor - cudaDevAttrMaxRegistersPerMultiprocessor = cyruntime.cudaDeviceAttr.cudaDevAttrMaxRegistersPerMultiprocessor{{endif}} + cudaDevAttrMaxRegistersPerMultiprocessor = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxRegistersPerMultiprocessor, + 'Maximum number of 32-bit registers available per multiprocessor\n' + ){{endif}} {{if 'cudaDevAttrManagedMemory' in found_values}} - #: Device can allocate managed memory on this system - cudaDevAttrManagedMemory = cyruntime.cudaDeviceAttr.cudaDevAttrManagedMemory{{endif}} + cudaDevAttrManagedMemory = ( + cyruntime.cudaDeviceAttr.cudaDevAttrManagedMemory, + 'Device can allocate managed memory on this system\n' + ){{endif}} {{if 'cudaDevAttrIsMultiGpuBoard' in found_values}} - #: Device is on a multi-GPU board - cudaDevAttrIsMultiGpuBoard = cyruntime.cudaDeviceAttr.cudaDevAttrIsMultiGpuBoard{{endif}} + cudaDevAttrIsMultiGpuBoard = ( + cyruntime.cudaDeviceAttr.cudaDevAttrIsMultiGpuBoard, + 'Device is on a multi-GPU board\n' + ){{endif}} {{if 'cudaDevAttrMultiGpuBoardGroupID' in found_values}} - #: Unique identifier for a group of devices on the same multi-GPU board - cudaDevAttrMultiGpuBoardGroupID = cyruntime.cudaDeviceAttr.cudaDevAttrMultiGpuBoardGroupID{{endif}} + cudaDevAttrMultiGpuBoardGroupID = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMultiGpuBoardGroupID, + 'Unique identifier for a group of devices on the same multi-GPU board\n' + ){{endif}} {{if 'cudaDevAttrHostNativeAtomicSupported' in found_values}} - #: Link between the device and the host supports native atomic - #: operations - cudaDevAttrHostNativeAtomicSupported = cyruntime.cudaDeviceAttr.cudaDevAttrHostNativeAtomicSupported{{endif}} + cudaDevAttrHostNativeAtomicSupported = ( + cyruntime.cudaDeviceAttr.cudaDevAttrHostNativeAtomicSupported, + 'Link between the device and the host supports native atomic operations\n' + ){{endif}} {{if 'cudaDevAttrSingleToDoublePrecisionPerfRatio' in found_values}} - #: Ratio of single precision performance (in floating-point operations - #: per second) to double precision performance - cudaDevAttrSingleToDoublePrecisionPerfRatio = cyruntime.cudaDeviceAttr.cudaDevAttrSingleToDoublePrecisionPerfRatio{{endif}} + cudaDevAttrSingleToDoublePrecisionPerfRatio = ( + cyruntime.cudaDeviceAttr.cudaDevAttrSingleToDoublePrecisionPerfRatio, + 'Ratio of single precision performance (in floating-point operations per\n' + 'second) to double precision performance\n' + ){{endif}} {{if 'cudaDevAttrPageableMemoryAccess' in found_values}} - #: Device supports coherently accessing pageable memory without calling - #: cudaHostRegister on it - cudaDevAttrPageableMemoryAccess = cyruntime.cudaDeviceAttr.cudaDevAttrPageableMemoryAccess{{endif}} + cudaDevAttrPageableMemoryAccess = ( + cyruntime.cudaDeviceAttr.cudaDevAttrPageableMemoryAccess, + 'Device supports coherently accessing pageable memory without calling\n' + 'cudaHostRegister on it\n' + ){{endif}} {{if 'cudaDevAttrConcurrentManagedAccess' in found_values}} - #: Device can coherently access managed memory concurrently with the - #: CPU - cudaDevAttrConcurrentManagedAccess = cyruntime.cudaDeviceAttr.cudaDevAttrConcurrentManagedAccess{{endif}} + cudaDevAttrConcurrentManagedAccess = ( + cyruntime.cudaDeviceAttr.cudaDevAttrConcurrentManagedAccess, + 'Device can coherently access managed memory concurrently with the CPU\n' + ){{endif}} {{if 'cudaDevAttrComputePreemptionSupported' in found_values}} - #: Device supports Compute Preemption - cudaDevAttrComputePreemptionSupported = cyruntime.cudaDeviceAttr.cudaDevAttrComputePreemptionSupported{{endif}} + cudaDevAttrComputePreemptionSupported = ( + cyruntime.cudaDeviceAttr.cudaDevAttrComputePreemptionSupported, + 'Device supports Compute Preemption\n' + ){{endif}} {{if 'cudaDevAttrCanUseHostPointerForRegisteredMem' in found_values}} - #: Device can access host registered memory at the same virtual address - #: as the CPU - cudaDevAttrCanUseHostPointerForRegisteredMem = cyruntime.cudaDeviceAttr.cudaDevAttrCanUseHostPointerForRegisteredMem{{endif}} + cudaDevAttrCanUseHostPointerForRegisteredMem = ( + cyruntime.cudaDeviceAttr.cudaDevAttrCanUseHostPointerForRegisteredMem, + 'Device can access host registered memory at the same virtual address as the\n' + 'CPU\n' + ){{endif}} {{if 'cudaDevAttrReserved92' in found_values}} cudaDevAttrReserved92 = cyruntime.cudaDeviceAttr.cudaDevAttrReserved92{{endif}} {{if 'cudaDevAttrReserved93' in found_values}} @@ -3543,100 +4467,137 @@ class cudaDeviceAttr(IntEnum): cudaDevAttrReserved94 = cyruntime.cudaDeviceAttr.cudaDevAttrReserved94{{endif}} {{if 'cudaDevAttrCooperativeLaunch' in found_values}} - #: Device supports launching cooperative kernels via - #: :py:obj:`~.cudaLaunchCooperativeKernel` - cudaDevAttrCooperativeLaunch = cyruntime.cudaDeviceAttr.cudaDevAttrCooperativeLaunch{{endif}} + cudaDevAttrCooperativeLaunch = ( + cyruntime.cudaDeviceAttr.cudaDevAttrCooperativeLaunch, + 'Device supports launching cooperative kernels via\n' + ':py:obj:`~.cudaLaunchCooperativeKernel`\n' + ){{endif}} {{if 'cudaDevAttrReserved96' in found_values}} cudaDevAttrReserved96 = cyruntime.cudaDeviceAttr.cudaDevAttrReserved96{{endif}} {{if 'cudaDevAttrMaxSharedMemoryPerBlockOptin' in found_values}} - #: The maximum optin shared memory per block. This value may vary by - #: chip. See :py:obj:`~.cudaFuncSetAttribute` - cudaDevAttrMaxSharedMemoryPerBlockOptin = cyruntime.cudaDeviceAttr.cudaDevAttrMaxSharedMemoryPerBlockOptin{{endif}} + cudaDevAttrMaxSharedMemoryPerBlockOptin = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxSharedMemoryPerBlockOptin, + 'The maximum optin shared memory per block. This value may vary by chip. See\n' + ':py:obj:`~.cudaFuncSetAttribute`\n' + ){{endif}} {{if 'cudaDevAttrCanFlushRemoteWrites' in found_values}} - #: Device supports flushing of outstanding remote writes. - cudaDevAttrCanFlushRemoteWrites = cyruntime.cudaDeviceAttr.cudaDevAttrCanFlushRemoteWrites{{endif}} + cudaDevAttrCanFlushRemoteWrites = ( + cyruntime.cudaDeviceAttr.cudaDevAttrCanFlushRemoteWrites, + 'Device supports flushing of outstanding remote writes.\n' + ){{endif}} {{if 'cudaDevAttrHostRegisterSupported' in found_values}} - #: Device supports host memory registration via - #: :py:obj:`~.cudaHostRegister`. - cudaDevAttrHostRegisterSupported = cyruntime.cudaDeviceAttr.cudaDevAttrHostRegisterSupported{{endif}} + cudaDevAttrHostRegisterSupported = ( + cyruntime.cudaDeviceAttr.cudaDevAttrHostRegisterSupported, + 'Device supports host memory registration via :py:obj:`~.cudaHostRegister`.\n' + ){{endif}} {{if 'cudaDevAttrPageableMemoryAccessUsesHostPageTables' in found_values}} - #: Device accesses pageable memory via the host's page tables. - cudaDevAttrPageableMemoryAccessUsesHostPageTables = cyruntime.cudaDeviceAttr.cudaDevAttrPageableMemoryAccessUsesHostPageTables{{endif}} + cudaDevAttrPageableMemoryAccessUsesHostPageTables = ( + cyruntime.cudaDeviceAttr.cudaDevAttrPageableMemoryAccessUsesHostPageTables, + "Device accesses pageable memory via the host's page tables.\n" + ){{endif}} {{if 'cudaDevAttrDirectManagedMemAccessFromHost' in found_values}} - #: Host can directly access managed memory on the device without - #: migration. - cudaDevAttrDirectManagedMemAccessFromHost = cyruntime.cudaDeviceAttr.cudaDevAttrDirectManagedMemAccessFromHost{{endif}} + cudaDevAttrDirectManagedMemAccessFromHost = ( + cyruntime.cudaDeviceAttr.cudaDevAttrDirectManagedMemAccessFromHost, + 'Host can directly access managed memory on the device without migration.\n' + ){{endif}} {{if 'cudaDevAttrMaxBlocksPerMultiprocessor' in found_values}} - #: Maximum number of blocks per multiprocessor - cudaDevAttrMaxBlocksPerMultiprocessor = cyruntime.cudaDeviceAttr.cudaDevAttrMaxBlocksPerMultiprocessor{{endif}} + cudaDevAttrMaxBlocksPerMultiprocessor = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxBlocksPerMultiprocessor, + 'Maximum number of blocks per multiprocessor\n' + ){{endif}} {{if 'cudaDevAttrMaxPersistingL2CacheSize' in found_values}} - #: Maximum L2 persisting lines capacity setting in bytes. - cudaDevAttrMaxPersistingL2CacheSize = cyruntime.cudaDeviceAttr.cudaDevAttrMaxPersistingL2CacheSize{{endif}} + cudaDevAttrMaxPersistingL2CacheSize = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxPersistingL2CacheSize, + 'Maximum L2 persisting lines capacity setting in bytes.\n' + ){{endif}} {{if 'cudaDevAttrMaxAccessPolicyWindowSize' in found_values}} - #: Maximum value of :py:obj:`~.cudaAccessPolicyWindow.num_bytes`. - cudaDevAttrMaxAccessPolicyWindowSize = cyruntime.cudaDeviceAttr.cudaDevAttrMaxAccessPolicyWindowSize{{endif}} + cudaDevAttrMaxAccessPolicyWindowSize = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMaxAccessPolicyWindowSize, + 'Maximum value of :py:obj:`~.cudaAccessPolicyWindow.num_bytes`.\n' + ){{endif}} {{if 'cudaDevAttrReservedSharedMemoryPerBlock' in found_values}} - #: Shared memory reserved by CUDA driver per block in bytes - cudaDevAttrReservedSharedMemoryPerBlock = cyruntime.cudaDeviceAttr.cudaDevAttrReservedSharedMemoryPerBlock{{endif}} + cudaDevAttrReservedSharedMemoryPerBlock = ( + cyruntime.cudaDeviceAttr.cudaDevAttrReservedSharedMemoryPerBlock, + 'Shared memory reserved by CUDA driver per block in bytes\n' + ){{endif}} {{if 'cudaDevAttrSparseCudaArraySupported' in found_values}} - #: Device supports sparse CUDA arrays and sparse CUDA mipmapped arrays - cudaDevAttrSparseCudaArraySupported = cyruntime.cudaDeviceAttr.cudaDevAttrSparseCudaArraySupported{{endif}} + cudaDevAttrSparseCudaArraySupported = ( + cyruntime.cudaDeviceAttr.cudaDevAttrSparseCudaArraySupported, + 'Device supports sparse CUDA arrays and sparse CUDA mipmapped arrays\n' + ){{endif}} {{if 'cudaDevAttrHostRegisterReadOnlySupported' in found_values}} - #: Device supports using the :py:obj:`~.cudaHostRegister` flag - #: cudaHostRegisterReadOnly to register memory that must be mapped as - #: read-only to the GPU - cudaDevAttrHostRegisterReadOnlySupported = cyruntime.cudaDeviceAttr.cudaDevAttrHostRegisterReadOnlySupported{{endif}} + cudaDevAttrHostRegisterReadOnlySupported = ( + cyruntime.cudaDeviceAttr.cudaDevAttrHostRegisterReadOnlySupported, + 'Device supports using the :py:obj:`~.cudaHostRegister` flag\n' + 'cudaHostRegisterReadOnly to register memory that must be mapped as read-\n' + 'only to the GPU\n' + ){{endif}} {{if 'cudaDevAttrTimelineSemaphoreInteropSupported' in found_values}} - #: External timeline semaphore interop is supported on the device - cudaDevAttrTimelineSemaphoreInteropSupported = cyruntime.cudaDeviceAttr.cudaDevAttrTimelineSemaphoreInteropSupported{{endif}} + cudaDevAttrTimelineSemaphoreInteropSupported = ( + cyruntime.cudaDeviceAttr.cudaDevAttrTimelineSemaphoreInteropSupported, + 'External timeline semaphore interop is supported on the device\n' + ){{endif}} {{if 'cudaDevAttrMemoryPoolsSupported' in found_values}} - #: Device supports using the :py:obj:`~.cudaMallocAsync` and - #: :py:obj:`~.cudaMemPool` family of APIs - cudaDevAttrMemoryPoolsSupported = cyruntime.cudaDeviceAttr.cudaDevAttrMemoryPoolsSupported{{endif}} + cudaDevAttrMemoryPoolsSupported = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMemoryPoolsSupported, + 'Device supports using the :py:obj:`~.cudaMallocAsync` and\n' + ':py:obj:`~.cudaMemPool` family of APIs\n' + ){{endif}} {{if 'cudaDevAttrGPUDirectRDMASupported' in found_values}} - #: Device supports GPUDirect RDMA APIs, like nvidia_p2p_get_pages (see - #: https://docs.nvidia.com/cuda/gpudirect-rdma for more information) - cudaDevAttrGPUDirectRDMASupported = cyruntime.cudaDeviceAttr.cudaDevAttrGPUDirectRDMASupported{{endif}} + cudaDevAttrGPUDirectRDMASupported = ( + cyruntime.cudaDeviceAttr.cudaDevAttrGPUDirectRDMASupported, + 'Device supports GPUDirect RDMA APIs, like nvidia_p2p_get_pages (see\n' + 'https://docs.nvidia.com/cuda/gpudirect-rdma for more information)\n' + ){{endif}} {{if 'cudaDevAttrGPUDirectRDMAFlushWritesOptions' in found_values}} - #: The returned attribute shall be interpreted as a bitmask, where the - #: individual bits are listed in the - #: :py:obj:`~.cudaFlushGPUDirectRDMAWritesOptions` enum - cudaDevAttrGPUDirectRDMAFlushWritesOptions = cyruntime.cudaDeviceAttr.cudaDevAttrGPUDirectRDMAFlushWritesOptions{{endif}} + cudaDevAttrGPUDirectRDMAFlushWritesOptions = ( + cyruntime.cudaDeviceAttr.cudaDevAttrGPUDirectRDMAFlushWritesOptions, + 'The returned attribute shall be interpreted as a bitmask, where the\n' + 'individual bits are listed in the\n' + ':py:obj:`~.cudaFlushGPUDirectRDMAWritesOptions` enum\n' + ){{endif}} {{if 'cudaDevAttrGPUDirectRDMAWritesOrdering' in found_values}} - #: GPUDirect RDMA writes to the device do not need to be flushed for - #: consumers within the scope indicated by the returned attribute. See - #: :py:obj:`~.cudaGPUDirectRDMAWritesOrdering` for the numerical values - #: returned here. - cudaDevAttrGPUDirectRDMAWritesOrdering = cyruntime.cudaDeviceAttr.cudaDevAttrGPUDirectRDMAWritesOrdering{{endif}} + cudaDevAttrGPUDirectRDMAWritesOrdering = ( + cyruntime.cudaDeviceAttr.cudaDevAttrGPUDirectRDMAWritesOrdering, + 'GPUDirect RDMA writes to the device do not need to be flushed for consumers\n' + 'within the scope indicated by the returned attribute. See\n' + ':py:obj:`~.cudaGPUDirectRDMAWritesOrdering` for the numerical values\n' + 'returned here.\n' + ){{endif}} {{if 'cudaDevAttrMemoryPoolSupportedHandleTypes' in found_values}} - #: Handle types supported with mempool based IPC - cudaDevAttrMemoryPoolSupportedHandleTypes = cyruntime.cudaDeviceAttr.cudaDevAttrMemoryPoolSupportedHandleTypes{{endif}} + cudaDevAttrMemoryPoolSupportedHandleTypes = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMemoryPoolSupportedHandleTypes, + 'Handle types supported with mempool based IPC\n' + ){{endif}} {{if 'cudaDevAttrClusterLaunch' in found_values}} - #: Indicates device supports cluster launch - cudaDevAttrClusterLaunch = cyruntime.cudaDeviceAttr.cudaDevAttrClusterLaunch{{endif}} + cudaDevAttrClusterLaunch = ( + cyruntime.cudaDeviceAttr.cudaDevAttrClusterLaunch, + 'Indicates device supports cluster launch\n' + ){{endif}} {{if 'cudaDevAttrDeferredMappingCudaArraySupported' in found_values}} - #: Device supports deferred mapping CUDA arrays and CUDA mipmapped - #: arrays - cudaDevAttrDeferredMappingCudaArraySupported = cyruntime.cudaDeviceAttr.cudaDevAttrDeferredMappingCudaArraySupported{{endif}} + cudaDevAttrDeferredMappingCudaArraySupported = ( + cyruntime.cudaDeviceAttr.cudaDevAttrDeferredMappingCudaArraySupported, + 'Device supports deferred mapping CUDA arrays and CUDA mipmapped arrays\n' + ){{endif}} {{if 'cudaDevAttrReserved122' in found_values}} cudaDevAttrReserved122 = cyruntime.cudaDeviceAttr.cudaDevAttrReserved122{{endif}} {{if 'cudaDevAttrReserved123' in found_values}} @@ -3645,12 +4606,16 @@ class cudaDeviceAttr(IntEnum): cudaDevAttrReserved124 = cyruntime.cudaDeviceAttr.cudaDevAttrReserved124{{endif}} {{if 'cudaDevAttrIpcEventSupport' in found_values}} - #: Device supports IPC Events. - cudaDevAttrIpcEventSupport = cyruntime.cudaDeviceAttr.cudaDevAttrIpcEventSupport{{endif}} + cudaDevAttrIpcEventSupport = ( + cyruntime.cudaDeviceAttr.cudaDevAttrIpcEventSupport, + 'Device supports IPC Events.\n' + ){{endif}} {{if 'cudaDevAttrMemSyncDomainCount' in found_values}} - #: Number of memory synchronization domains the device supports. - cudaDevAttrMemSyncDomainCount = cyruntime.cudaDeviceAttr.cudaDevAttrMemSyncDomainCount{{endif}} + cudaDevAttrMemSyncDomainCount = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMemSyncDomainCount, + 'Number of memory synchronization domains the device supports.\n' + ){{endif}} {{if 'cudaDevAttrReserved127' in found_values}} cudaDevAttrReserved127 = cyruntime.cudaDeviceAttr.cudaDevAttrReserved127{{endif}} {{if 'cudaDevAttrReserved128' in found_values}} @@ -3659,132 +4624,167 @@ class cudaDeviceAttr(IntEnum): cudaDevAttrReserved129 = cyruntime.cudaDeviceAttr.cudaDevAttrReserved129{{endif}} {{if 'cudaDevAttrNumaConfig' in found_values}} - #: NUMA configuration of a device: value is of type - #: :py:obj:`~.cudaDeviceNumaConfig` enum - cudaDevAttrNumaConfig = cyruntime.cudaDeviceAttr.cudaDevAttrNumaConfig{{endif}} + cudaDevAttrNumaConfig = ( + cyruntime.cudaDeviceAttr.cudaDevAttrNumaConfig, + 'NUMA configuration of a device: value is of type\n' + ':py:obj:`~.cudaDeviceNumaConfig` enum\n' + ){{endif}} {{if 'cudaDevAttrNumaId' in found_values}} - #: NUMA node ID of the GPU memory - cudaDevAttrNumaId = cyruntime.cudaDeviceAttr.cudaDevAttrNumaId{{endif}} + cudaDevAttrNumaId = ( + cyruntime.cudaDeviceAttr.cudaDevAttrNumaId, + 'NUMA node ID of the GPU memory\n' + ){{endif}} {{if 'cudaDevAttrReserved132' in found_values}} cudaDevAttrReserved132 = cyruntime.cudaDeviceAttr.cudaDevAttrReserved132{{endif}} {{if 'cudaDevAttrMpsEnabled' in found_values}} - #: Contexts created on this device will be shared via MPS - cudaDevAttrMpsEnabled = cyruntime.cudaDeviceAttr.cudaDevAttrMpsEnabled{{endif}} + cudaDevAttrMpsEnabled = ( + cyruntime.cudaDeviceAttr.cudaDevAttrMpsEnabled, + 'Contexts created on this device will be shared via MPS\n' + ){{endif}} {{if 'cudaDevAttrHostNumaId' in found_values}} - #: NUMA ID of the host node closest to the device or -1 when system - #: does not support NUMA - cudaDevAttrHostNumaId = cyruntime.cudaDeviceAttr.cudaDevAttrHostNumaId{{endif}} + cudaDevAttrHostNumaId = ( + cyruntime.cudaDeviceAttr.cudaDevAttrHostNumaId, + 'NUMA ID of the host node closest to the device or -1 when system does not\n' + 'support NUMA\n' + ){{endif}} {{if 'cudaDevAttrD3D12CigSupported' in found_values}} - #: Device supports CIG with D3D12. - cudaDevAttrD3D12CigSupported = cyruntime.cudaDeviceAttr.cudaDevAttrD3D12CigSupported{{endif}} + cudaDevAttrD3D12CigSupported = ( + cyruntime.cudaDeviceAttr.cudaDevAttrD3D12CigSupported, + 'Device supports CIG with D3D12.\n' + ){{endif}} {{if 'cudaDevAttrVulkanCigSupported' in found_values}} - #: Device supports CIG with Vulkan. - cudaDevAttrVulkanCigSupported = cyruntime.cudaDeviceAttr.cudaDevAttrVulkanCigSupported{{endif}} + cudaDevAttrVulkanCigSupported = ( + cyruntime.cudaDeviceAttr.cudaDevAttrVulkanCigSupported, + 'Device supports CIG with Vulkan.\n' + ){{endif}} {{if 'cudaDevAttrGpuPciDeviceId' in found_values}} - #: The combined 16-bit PCI device ID and 16-bit PCI vendor ID. - cudaDevAttrGpuPciDeviceId = cyruntime.cudaDeviceAttr.cudaDevAttrGpuPciDeviceId{{endif}} + cudaDevAttrGpuPciDeviceId = ( + cyruntime.cudaDeviceAttr.cudaDevAttrGpuPciDeviceId, + 'The combined 16-bit PCI device ID and 16-bit PCI vendor ID.\n' + ){{endif}} {{if 'cudaDevAttrGpuPciSubsystemId' in found_values}} - #: The combined 16-bit PCI subsystem ID and 16-bit PCI subsystem vendor - #: ID. - cudaDevAttrGpuPciSubsystemId = cyruntime.cudaDeviceAttr.cudaDevAttrGpuPciSubsystemId{{endif}} + cudaDevAttrGpuPciSubsystemId = ( + cyruntime.cudaDeviceAttr.cudaDevAttrGpuPciSubsystemId, + 'The combined 16-bit PCI subsystem ID and 16-bit PCI subsystem vendor ID.\n' + ){{endif}} {{if 'cudaDevAttrReserved141' in found_values}} cudaDevAttrReserved141 = cyruntime.cudaDeviceAttr.cudaDevAttrReserved141{{endif}} {{if 'cudaDevAttrHostNumaMemoryPoolsSupported' in found_values}} - #: Device supports HOST_NUMA location with the - #: :py:obj:`~.cudaMallocAsync` and :py:obj:`~.cudaMemPool` family of - #: APIs - cudaDevAttrHostNumaMemoryPoolsSupported = cyruntime.cudaDeviceAttr.cudaDevAttrHostNumaMemoryPoolsSupported{{endif}} + cudaDevAttrHostNumaMemoryPoolsSupported = ( + cyruntime.cudaDeviceAttr.cudaDevAttrHostNumaMemoryPoolsSupported, + 'Device supports HOST_NUMA location with the :py:obj:`~.cudaMallocAsync` and\n' + ':py:obj:`~.cudaMemPool` family of APIs\n' + ){{endif}} {{if 'cudaDevAttrHostNumaMultinodeIpcSupported' in found_values}} - #: Device supports HostNuma location IPC between nodes in a multi-node - #: system. - cudaDevAttrHostNumaMultinodeIpcSupported = cyruntime.cudaDeviceAttr.cudaDevAttrHostNumaMultinodeIpcSupported{{endif}} + cudaDevAttrHostNumaMultinodeIpcSupported = ( + cyruntime.cudaDeviceAttr.cudaDevAttrHostNumaMultinodeIpcSupported, + 'Device supports HostNuma location IPC between nodes in a multi-node system.\n' + ){{endif}} {{if 'cudaDevAttrHostMemoryPoolsSupported' in found_values}} - #: Device suports HOST location with the :py:obj:`~.cuMemAllocAsync` - #: and :py:obj:`~.cuMemPool` family of APIs - cudaDevAttrHostMemoryPoolsSupported = cyruntime.cudaDeviceAttr.cudaDevAttrHostMemoryPoolsSupported{{endif}} + cudaDevAttrHostMemoryPoolsSupported = ( + cyruntime.cudaDeviceAttr.cudaDevAttrHostMemoryPoolsSupported, + 'Device suports HOST location with the :py:obj:`~.cuMemAllocAsync` and\n' + ':py:obj:`~.cuMemPool` family of APIs\n' + ){{endif}} {{if 'cudaDevAttrReserved145' in found_values}} cudaDevAttrReserved145 = cyruntime.cudaDeviceAttr.cudaDevAttrReserved145{{endif}} {{if 'cudaDevAttrOnlyPartialHostNativeAtomicSupported' in found_values}} - #: Link between the device and the host supports only some native - #: atomic operations - cudaDevAttrOnlyPartialHostNativeAtomicSupported = cyruntime.cudaDeviceAttr.cudaDevAttrOnlyPartialHostNativeAtomicSupported{{endif}} + cudaDevAttrOnlyPartialHostNativeAtomicSupported = ( + cyruntime.cudaDeviceAttr.cudaDevAttrOnlyPartialHostNativeAtomicSupported, + 'Link between the device and the host supports only some native atomic\n' + 'operations\n' + ){{endif}} {{if 'cudaDevAttrMax' in found_values}} cudaDevAttrMax = cyruntime.cudaDeviceAttr.cudaDevAttrMax{{endif}} -_dict_cudaDeviceAttr = dict(((int(v), v) for k, v in cudaDeviceAttr.__members__.items())) {{endif}} {{if 'cudaMemPoolAttr' in found_types}} -class cudaMemPoolAttr(IntEnum): +class cudaMemPoolAttr(_FastEnum): """ CUDA memory pool attributes """ {{if 'cudaMemPoolReuseFollowEventDependencies' in found_values}} - #: (value type = int) Allow cuMemAllocAsync to use memory - #: asynchronously freed in another streams as long as a stream ordering - #: dependency of the allocating stream on the free action exists. Cuda - #: events and null stream interactions can create the required stream - #: ordered dependencies. (default enabled) - cudaMemPoolReuseFollowEventDependencies = cyruntime.cudaMemPoolAttr.cudaMemPoolReuseFollowEventDependencies{{endif}} + cudaMemPoolReuseFollowEventDependencies = ( + cyruntime.cudaMemPoolAttr.cudaMemPoolReuseFollowEventDependencies, + '(value type = int) Allow cuMemAllocAsync to use memory asynchronously freed\n' + 'in another streams as long as a stream ordering dependency of the\n' + 'allocating stream on the free action exists. Cuda events and null stream\n' + 'interactions can create the required stream ordered dependencies. (default\n' + 'enabled)\n' + ){{endif}} {{if 'cudaMemPoolReuseAllowOpportunistic' in found_values}} - #: (value type = int) Allow reuse of already completed frees when there - #: is no dependency between the free and allocation. (default enabled) - cudaMemPoolReuseAllowOpportunistic = cyruntime.cudaMemPoolAttr.cudaMemPoolReuseAllowOpportunistic{{endif}} + cudaMemPoolReuseAllowOpportunistic = ( + cyruntime.cudaMemPoolAttr.cudaMemPoolReuseAllowOpportunistic, + '(value type = int) Allow reuse of already completed frees when there is no\n' + 'dependency between the free and allocation. (default enabled)\n' + ){{endif}} {{if 'cudaMemPoolReuseAllowInternalDependencies' in found_values}} - #: (value type = int) Allow cuMemAllocAsync to insert new stream - #: dependencies in order to establish the stream ordering required to - #: reuse a piece of memory released by cuFreeAsync (default enabled). - cudaMemPoolReuseAllowInternalDependencies = cyruntime.cudaMemPoolAttr.cudaMemPoolReuseAllowInternalDependencies{{endif}} + cudaMemPoolReuseAllowInternalDependencies = ( + cyruntime.cudaMemPoolAttr.cudaMemPoolReuseAllowInternalDependencies, + '(value type = int) Allow cuMemAllocAsync to insert new stream dependencies\n' + 'in order to establish the stream ordering required to reuse a piece of\n' + 'memory released by cuFreeAsync (default enabled).\n' + ){{endif}} {{if 'cudaMemPoolAttrReleaseThreshold' in found_values}} - #: (value type = cuuint64_t) Amount of reserved memory in bytes to hold - #: onto before trying to release memory back to the OS. When more than - #: the release threshold bytes of memory are held by the memory pool, - #: the allocator will try to release memory back to the OS on the next - #: call to stream, event or context synchronize. (default 0) - cudaMemPoolAttrReleaseThreshold = cyruntime.cudaMemPoolAttr.cudaMemPoolAttrReleaseThreshold{{endif}} + cudaMemPoolAttrReleaseThreshold = ( + cyruntime.cudaMemPoolAttr.cudaMemPoolAttrReleaseThreshold, + '(value type = cuuint64_t) Amount of reserved memory in bytes to hold onto\n' + 'before trying to release memory back to the OS. When more than the release\n' + 'threshold bytes of memory are held by the memory pool, the allocator will\n' + 'try to release memory back to the OS on the next call to stream, event or\n' + 'context synchronize. (default 0)\n' + ){{endif}} {{if 'cudaMemPoolAttrReservedMemCurrent' in found_values}} - #: (value type = cuuint64_t) Amount of backing memory currently - #: allocated for the mempool. - cudaMemPoolAttrReservedMemCurrent = cyruntime.cudaMemPoolAttr.cudaMemPoolAttrReservedMemCurrent{{endif}} + cudaMemPoolAttrReservedMemCurrent = ( + cyruntime.cudaMemPoolAttr.cudaMemPoolAttrReservedMemCurrent, + '(value type = cuuint64_t) Amount of backing memory currently allocated for\n' + 'the mempool.\n' + ){{endif}} {{if 'cudaMemPoolAttrReservedMemHigh' in found_values}} - #: (value type = cuuint64_t) High watermark of backing memory allocated - #: for the mempool since the last time it was reset. High watermark can - #: only be reset to zero. - cudaMemPoolAttrReservedMemHigh = cyruntime.cudaMemPoolAttr.cudaMemPoolAttrReservedMemHigh{{endif}} + cudaMemPoolAttrReservedMemHigh = ( + cyruntime.cudaMemPoolAttr.cudaMemPoolAttrReservedMemHigh, + '(value type = cuuint64_t) High watermark of backing memory allocated for\n' + 'the mempool since the last time it was reset. High watermark can only be\n' + 'reset to zero.\n' + ){{endif}} {{if 'cudaMemPoolAttrUsedMemCurrent' in found_values}} - #: (value type = cuuint64_t) Amount of memory from the pool that is - #: currently in use by the application. - cudaMemPoolAttrUsedMemCurrent = cyruntime.cudaMemPoolAttr.cudaMemPoolAttrUsedMemCurrent{{endif}} + cudaMemPoolAttrUsedMemCurrent = ( + cyruntime.cudaMemPoolAttr.cudaMemPoolAttrUsedMemCurrent, + '(value type = cuuint64_t) Amount of memory from the pool that is currently\n' + 'in use by the application.\n' + ){{endif}} {{if 'cudaMemPoolAttrUsedMemHigh' in found_values}} - #: (value type = cuuint64_t) High watermark of the amount of memory - #: from the pool that was in use by the application since the last time - #: it was reset. High watermark can only be reset to zero. - cudaMemPoolAttrUsedMemHigh = cyruntime.cudaMemPoolAttr.cudaMemPoolAttrUsedMemHigh{{endif}} + cudaMemPoolAttrUsedMemHigh = ( + cyruntime.cudaMemPoolAttr.cudaMemPoolAttrUsedMemHigh, + '(value type = cuuint64_t) High watermark of the amount of memory from the\n' + 'pool that was in use by the application since the last time it was reset.\n' + 'High watermark can only be reset to zero.\n' + ){{endif}} -_dict_cudaMemPoolAttr = dict(((int(v), v) for k, v in cudaMemPoolAttr.__members__.items())) {{endif}} {{if 'cudaMemLocationType' in found_types}} -class cudaMemLocationType(IntEnum): +class cudaMemLocationType(_FastEnum): """ Specifies the type of location """ @@ -3792,53 +4792,67 @@ class cudaMemLocationType(IntEnum): cudaMemLocationTypeInvalid = cyruntime.cudaMemLocationType.cudaMemLocationTypeInvalid{{endif}} {{if 'cudaMemLocationTypeNone' in found_values}} - #: Location is unspecified. This is used when creating a managed memory - #: pool to indicate no preferred location for the pool - cudaMemLocationTypeNone = cyruntime.cudaMemLocationType.cudaMemLocationTypeNone{{endif}} + cudaMemLocationTypeNone = ( + cyruntime.cudaMemLocationType.cudaMemLocationTypeNone, + 'Location is unspecified. This is used when creating a managed memory pool\n' + 'to indicate no preferred location for the pool\n' + ){{endif}} {{if 'cudaMemLocationTypeDevice' in found_values}} - #: Location is a device location, thus id is a device ordinal - cudaMemLocationTypeDevice = cyruntime.cudaMemLocationType.cudaMemLocationTypeDevice{{endif}} + cudaMemLocationTypeDevice = ( + cyruntime.cudaMemLocationType.cudaMemLocationTypeDevice, + 'Location is a device location, thus id is a device ordinal\n' + ){{endif}} {{if 'cudaMemLocationTypeHost' in found_values}} - #: Location is host, id is ignored - cudaMemLocationTypeHost = cyruntime.cudaMemLocationType.cudaMemLocationTypeHost{{endif}} + cudaMemLocationTypeHost = ( + cyruntime.cudaMemLocationType.cudaMemLocationTypeHost, + 'Location is host, id is ignored\n' + ){{endif}} {{if 'cudaMemLocationTypeHostNuma' in found_values}} - #: Location is a host NUMA node, thus id is a host NUMA node id - cudaMemLocationTypeHostNuma = cyruntime.cudaMemLocationType.cudaMemLocationTypeHostNuma{{endif}} + cudaMemLocationTypeHostNuma = ( + cyruntime.cudaMemLocationType.cudaMemLocationTypeHostNuma, + 'Location is a host NUMA node, thus id is a host NUMA node id\n' + ){{endif}} {{if 'cudaMemLocationTypeHostNumaCurrent' in found_values}} - #: Location is the host NUMA node closest to the current thread's CPU, - #: id is ignored - cudaMemLocationTypeHostNumaCurrent = cyruntime.cudaMemLocationType.cudaMemLocationTypeHostNumaCurrent{{endif}} + cudaMemLocationTypeHostNumaCurrent = ( + cyruntime.cudaMemLocationType.cudaMemLocationTypeHostNumaCurrent, + "Location is the host NUMA node closest to the current thread's CPU, id is\n" + 'ignored\n' + ){{endif}} -_dict_cudaMemLocationType = dict(((int(v), v) for k, v in cudaMemLocationType.__members__.items())) {{endif}} {{if 'cudaMemAccessFlags' in found_types}} -class cudaMemAccessFlags(IntEnum): +class cudaMemAccessFlags(_FastEnum): """ Specifies the memory protection flags for mapping. """ {{if 'cudaMemAccessFlagsProtNone' in found_values}} - #: Default, make the address range not accessible - cudaMemAccessFlagsProtNone = cyruntime.cudaMemAccessFlags.cudaMemAccessFlagsProtNone{{endif}} + cudaMemAccessFlagsProtNone = ( + cyruntime.cudaMemAccessFlags.cudaMemAccessFlagsProtNone, + 'Default, make the address range not accessible\n' + ){{endif}} {{if 'cudaMemAccessFlagsProtRead' in found_values}} - #: Make the address range read accessible - cudaMemAccessFlagsProtRead = cyruntime.cudaMemAccessFlags.cudaMemAccessFlagsProtRead{{endif}} + cudaMemAccessFlagsProtRead = ( + cyruntime.cudaMemAccessFlags.cudaMemAccessFlagsProtRead, + 'Make the address range read accessible\n' + ){{endif}} {{if 'cudaMemAccessFlagsProtReadWrite' in found_values}} - #: Make the address range read-write accessible - cudaMemAccessFlagsProtReadWrite = cyruntime.cudaMemAccessFlags.cudaMemAccessFlagsProtReadWrite{{endif}} + cudaMemAccessFlagsProtReadWrite = ( + cyruntime.cudaMemAccessFlags.cudaMemAccessFlagsProtReadWrite, + 'Make the address range read-write accessible\n' + ){{endif}} -_dict_cudaMemAccessFlags = dict(((int(v), v) for k, v in cudaMemAccessFlags.__members__.items())) {{endif}} {{if 'cudaMemAllocationType' in found_types}} -class cudaMemAllocationType(IntEnum): +class cudaMemAllocationType(_FastEnum): """ Defines the allocation types available """ @@ -3846,83 +4860,100 @@ class cudaMemAllocationType(IntEnum): cudaMemAllocationTypeInvalid = cyruntime.cudaMemAllocationType.cudaMemAllocationTypeInvalid{{endif}} {{if 'cudaMemAllocationTypePinned' in found_values}} - #: This allocation type is 'pinned', i.e. cannot migrate from its - #: current location while the application is actively using it - cudaMemAllocationTypePinned = cyruntime.cudaMemAllocationType.cudaMemAllocationTypePinned{{endif}} + cudaMemAllocationTypePinned = ( + cyruntime.cudaMemAllocationType.cudaMemAllocationTypePinned, + "This allocation type is 'pinned', i.e. cannot migrate from its current\n" + 'location while the application is actively using it\n' + ){{endif}} {{if 'cudaMemAllocationTypeManaged' in found_values}} - #: This allocation type is managed memory - cudaMemAllocationTypeManaged = cyruntime.cudaMemAllocationType.cudaMemAllocationTypeManaged{{endif}} + cudaMemAllocationTypeManaged = ( + cyruntime.cudaMemAllocationType.cudaMemAllocationTypeManaged, + 'This allocation type is managed memory\n' + ){{endif}} {{if 'cudaMemAllocationTypeMax' in found_values}} cudaMemAllocationTypeMax = cyruntime.cudaMemAllocationType.cudaMemAllocationTypeMax{{endif}} -_dict_cudaMemAllocationType = dict(((int(v), v) for k, v in cudaMemAllocationType.__members__.items())) {{endif}} {{if 'cudaMemAllocationHandleType' in found_types}} -class cudaMemAllocationHandleType(IntEnum): +class cudaMemAllocationHandleType(_FastEnum): """ Flags for specifying particular handle types """ {{if 'cudaMemHandleTypeNone' in found_values}} - #: Does not allow any export mechanism. > - cudaMemHandleTypeNone = cyruntime.cudaMemAllocationHandleType.cudaMemHandleTypeNone{{endif}} + cudaMemHandleTypeNone = ( + cyruntime.cudaMemAllocationHandleType.cudaMemHandleTypeNone, + 'Does not allow any export mechanism. >\n' + ){{endif}} {{if 'cudaMemHandleTypePosixFileDescriptor' in found_values}} - #: Allows a file descriptor to be used for exporting. Permitted only on - #: POSIX systems. (int) - cudaMemHandleTypePosixFileDescriptor = cyruntime.cudaMemAllocationHandleType.cudaMemHandleTypePosixFileDescriptor{{endif}} + cudaMemHandleTypePosixFileDescriptor = ( + cyruntime.cudaMemAllocationHandleType.cudaMemHandleTypePosixFileDescriptor, + 'Allows a file descriptor to be used for exporting. Permitted only on POSIX\n' + 'systems. (int)\n' + ){{endif}} {{if 'cudaMemHandleTypeWin32' in found_values}} - #: Allows a Win32 NT handle to be used for exporting. (HANDLE) - cudaMemHandleTypeWin32 = cyruntime.cudaMemAllocationHandleType.cudaMemHandleTypeWin32{{endif}} + cudaMemHandleTypeWin32 = ( + cyruntime.cudaMemAllocationHandleType.cudaMemHandleTypeWin32, + 'Allows a Win32 NT handle to be used for exporting. (HANDLE)\n' + ){{endif}} {{if 'cudaMemHandleTypeWin32Kmt' in found_values}} - #: Allows a Win32 KMT handle to be used for exporting. (D3DKMT_HANDLE) - cudaMemHandleTypeWin32Kmt = cyruntime.cudaMemAllocationHandleType.cudaMemHandleTypeWin32Kmt{{endif}} + cudaMemHandleTypeWin32Kmt = ( + cyruntime.cudaMemAllocationHandleType.cudaMemHandleTypeWin32Kmt, + 'Allows a Win32 KMT handle to be used for exporting. (D3DKMT_HANDLE)\n' + ){{endif}} {{if 'cudaMemHandleTypeFabric' in found_values}} - #: Allows a fabric handle to be used for exporting. - #: (cudaMemFabricHandle_t) - cudaMemHandleTypeFabric = cyruntime.cudaMemAllocationHandleType.cudaMemHandleTypeFabric{{endif}} + cudaMemHandleTypeFabric = ( + cyruntime.cudaMemAllocationHandleType.cudaMemHandleTypeFabric, + 'Allows a fabric handle to be used for exporting. (cudaMemFabricHandle_t)\n' + ){{endif}} -_dict_cudaMemAllocationHandleType = dict(((int(v), v) for k, v in cudaMemAllocationHandleType.__members__.items())) {{endif}} {{if 'cudaGraphMemAttributeType' in found_types}} -class cudaGraphMemAttributeType(IntEnum): +class cudaGraphMemAttributeType(_FastEnum): """ Graph memory attributes """ {{if 'cudaGraphMemAttrUsedMemCurrent' in found_values}} - #: (value type = cuuint64_t) Amount of memory, in bytes, currently - #: associated with graphs. - cudaGraphMemAttrUsedMemCurrent = cyruntime.cudaGraphMemAttributeType.cudaGraphMemAttrUsedMemCurrent{{endif}} + cudaGraphMemAttrUsedMemCurrent = ( + cyruntime.cudaGraphMemAttributeType.cudaGraphMemAttrUsedMemCurrent, + '(value type = cuuint64_t) Amount of memory, in bytes, currently associated\n' + 'with graphs.\n' + ){{endif}} {{if 'cudaGraphMemAttrUsedMemHigh' in found_values}} - #: (value type = cuuint64_t) High watermark of memory, in bytes, - #: associated with graphs since the last time it was reset. High - #: watermark can only be reset to zero. - cudaGraphMemAttrUsedMemHigh = cyruntime.cudaGraphMemAttributeType.cudaGraphMemAttrUsedMemHigh{{endif}} + cudaGraphMemAttrUsedMemHigh = ( + cyruntime.cudaGraphMemAttributeType.cudaGraphMemAttrUsedMemHigh, + '(value type = cuuint64_t) High watermark of memory, in bytes, associated\n' + 'with graphs since the last time it was reset. High watermark can only be\n' + 'reset to zero.\n' + ){{endif}} {{if 'cudaGraphMemAttrReservedMemCurrent' in found_values}} - #: (value type = cuuint64_t) Amount of memory, in bytes, currently - #: allocated for use by the CUDA graphs asynchronous allocator. - cudaGraphMemAttrReservedMemCurrent = cyruntime.cudaGraphMemAttributeType.cudaGraphMemAttrReservedMemCurrent{{endif}} + cudaGraphMemAttrReservedMemCurrent = ( + cyruntime.cudaGraphMemAttributeType.cudaGraphMemAttrReservedMemCurrent, + '(value type = cuuint64_t) Amount of memory, in bytes, currently allocated\n' + 'for use by the CUDA graphs asynchronous allocator.\n' + ){{endif}} {{if 'cudaGraphMemAttrReservedMemHigh' in found_values}} - #: (value type = cuuint64_t) High watermark of memory, in bytes, - #: currently allocated for use by the CUDA graphs asynchronous - #: allocator. - cudaGraphMemAttrReservedMemHigh = cyruntime.cudaGraphMemAttributeType.cudaGraphMemAttrReservedMemHigh{{endif}} + cudaGraphMemAttrReservedMemHigh = ( + cyruntime.cudaGraphMemAttributeType.cudaGraphMemAttrReservedMemHigh, + '(value type = cuuint64_t) High watermark of memory, in bytes, currently\n' + 'allocated for use by the CUDA graphs asynchronous allocator.\n' + ){{endif}} -_dict_cudaGraphMemAttributeType = dict(((int(v), v) for k, v in cudaGraphMemAttributeType.__members__.items())) {{endif}} {{if 'cudaMemcpyFlags' in found_types}} -class cudaMemcpyFlags(IntEnum): +class cudaMemcpyFlags(_FastEnum): """ Flags to specify for copies within a batch. For more details see :py:obj:`~.cudaMemcpyBatchAsync`. @@ -3931,105 +4962,123 @@ class cudaMemcpyFlags(IntEnum): cudaMemcpyFlagDefault = cyruntime.cudaMemcpyFlags.cudaMemcpyFlagDefault{{endif}} {{if 'cudaMemcpyFlagPreferOverlapWithCompute' in found_values}} - #: Hint to the driver to try and overlap the copy with compute work on - #: the SMs. - cudaMemcpyFlagPreferOverlapWithCompute = cyruntime.cudaMemcpyFlags.cudaMemcpyFlagPreferOverlapWithCompute{{endif}} + cudaMemcpyFlagPreferOverlapWithCompute = ( + cyruntime.cudaMemcpyFlags.cudaMemcpyFlagPreferOverlapWithCompute, + 'Hint to the driver to try and overlap the copy with compute work on the\n' + 'SMs.\n' + ){{endif}} -_dict_cudaMemcpyFlags = dict(((int(v), v) for k, v in cudaMemcpyFlags.__members__.items())) {{endif}} {{if 'cudaMemcpySrcAccessOrder' in found_types}} -class cudaMemcpySrcAccessOrder(IntEnum): +class cudaMemcpySrcAccessOrder(_FastEnum): """ """ {{if 'cudaMemcpySrcAccessOrderInvalid' in found_values}} - #: Default invalid. - cudaMemcpySrcAccessOrderInvalid = cyruntime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderInvalid{{endif}} + cudaMemcpySrcAccessOrderInvalid = ( + cyruntime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderInvalid, + 'Default invalid.\n' + ){{endif}} {{if 'cudaMemcpySrcAccessOrderStream' in found_values}} - #: Indicates that access to the source pointer must be in stream order. - cudaMemcpySrcAccessOrderStream = cyruntime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderStream{{endif}} + cudaMemcpySrcAccessOrderStream = ( + cyruntime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderStream, + 'Indicates that access to the source pointer must be in stream order.\n' + ){{endif}} {{if 'cudaMemcpySrcAccessOrderDuringApiCall' in found_values}} - #: Indicates that access to the source pointer can be out of stream - #: order and all accesses must be complete before the API call returns. - #: This flag is suited for ephemeral sources (ex., stack variables) - #: when it's known that no prior operations in the stream can be - #: accessing the memory and also that the lifetime of the memory is - #: limited to the scope that the source variable was declared in. - #: Specifying this flag allows the driver to optimize the copy and - #: removes the need for the user to synchronize the stream after the - #: API call. - cudaMemcpySrcAccessOrderDuringApiCall = cyruntime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderDuringApiCall{{endif}} + cudaMemcpySrcAccessOrderDuringApiCall = ( + cyruntime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderDuringApiCall, + 'Indicates that access to the source pointer can be out of stream order and\n' + 'all accesses must be complete before the API call returns. This flag is\n' + "suited for ephemeral sources (ex., stack variables) when it's known that no\n" + 'prior operations in the stream can be accessing the memory and also that\n' + 'the lifetime of the memory is limited to the scope that the source variable\n' + 'was declared in. Specifying this flag allows the driver to optimize the\n' + 'copy and removes the need for the user to synchronize the stream after the\n' + 'API call.\n' + ){{endif}} {{if 'cudaMemcpySrcAccessOrderAny' in found_values}} - #: Indicates that access to the source pointer can be out of stream - #: order and the accesses can happen even after the API call returns. - #: This flag is suited for host pointers allocated outside CUDA (ex., - #: via malloc) when it's known that no prior operations in the stream - #: can be accessing the memory. Specifying this flag allows the driver - #: to optimize the copy on certain platforms. - cudaMemcpySrcAccessOrderAny = cyruntime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderAny{{endif}} + cudaMemcpySrcAccessOrderAny = ( + cyruntime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderAny, + 'Indicates that access to the source pointer can be out of stream order and\n' + 'the accesses can happen even after the API call returns. This flag is\n' + "suited for host pointers allocated outside CUDA (ex., via malloc) when it's\n" + 'known that no prior operations in the stream can be accessing the memory.\n' + 'Specifying this flag allows the driver to optimize the copy on certain\n' + 'platforms.\n' + ){{endif}} {{if 'cudaMemcpySrcAccessOrderMax' in found_values}} cudaMemcpySrcAccessOrderMax = cyruntime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderMax{{endif}} -_dict_cudaMemcpySrcAccessOrder = dict(((int(v), v) for k, v in cudaMemcpySrcAccessOrder.__members__.items())) {{endif}} {{if 'cudaMemcpy3DOperandType' in found_types}} -class cudaMemcpy3DOperandType(IntEnum): +class cudaMemcpy3DOperandType(_FastEnum): """ These flags allow applications to convey the operand type for individual copies specified in :py:obj:`~.cudaMemcpy3DBatchAsync`. """ {{if 'cudaMemcpyOperandTypePointer' in found_values}} - #: Memcpy operand is a valid pointer. - cudaMemcpyOperandTypePointer = cyruntime.cudaMemcpy3DOperandType.cudaMemcpyOperandTypePointer{{endif}} + cudaMemcpyOperandTypePointer = ( + cyruntime.cudaMemcpy3DOperandType.cudaMemcpyOperandTypePointer, + 'Memcpy operand is a valid pointer.\n' + ){{endif}} {{if 'cudaMemcpyOperandTypeArray' in found_values}} - #: Memcpy operand is a CUarray. - cudaMemcpyOperandTypeArray = cyruntime.cudaMemcpy3DOperandType.cudaMemcpyOperandTypeArray{{endif}} + cudaMemcpyOperandTypeArray = ( + cyruntime.cudaMemcpy3DOperandType.cudaMemcpyOperandTypeArray, + 'Memcpy operand is a CUarray.\n' + ){{endif}} {{if 'cudaMemcpyOperandTypeMax' in found_values}} cudaMemcpyOperandTypeMax = cyruntime.cudaMemcpy3DOperandType.cudaMemcpyOperandTypeMax{{endif}} -_dict_cudaMemcpy3DOperandType = dict(((int(v), v) for k, v in cudaMemcpy3DOperandType.__members__.items())) {{endif}} {{if 'cudaDeviceP2PAttr' in found_types}} -class cudaDeviceP2PAttr(IntEnum): +class cudaDeviceP2PAttr(_FastEnum): """ CUDA device P2P attributes """ {{if 'cudaDevP2PAttrPerformanceRank' in found_values}} - #: A relative value indicating the performance of the link between two - #: devices - cudaDevP2PAttrPerformanceRank = cyruntime.cudaDeviceP2PAttr.cudaDevP2PAttrPerformanceRank{{endif}} + cudaDevP2PAttrPerformanceRank = ( + cyruntime.cudaDeviceP2PAttr.cudaDevP2PAttrPerformanceRank, + 'A relative value indicating the performance of the link between two devices\n' + ){{endif}} {{if 'cudaDevP2PAttrAccessSupported' in found_values}} - #: Peer access is enabled - cudaDevP2PAttrAccessSupported = cyruntime.cudaDeviceP2PAttr.cudaDevP2PAttrAccessSupported{{endif}} + cudaDevP2PAttrAccessSupported = ( + cyruntime.cudaDeviceP2PAttr.cudaDevP2PAttrAccessSupported, + 'Peer access is enabled\n' + ){{endif}} {{if 'cudaDevP2PAttrNativeAtomicSupported' in found_values}} - #: Native atomic operation over the link supported - cudaDevP2PAttrNativeAtomicSupported = cyruntime.cudaDeviceP2PAttr.cudaDevP2PAttrNativeAtomicSupported{{endif}} + cudaDevP2PAttrNativeAtomicSupported = ( + cyruntime.cudaDeviceP2PAttr.cudaDevP2PAttrNativeAtomicSupported, + 'Native atomic operation over the link supported\n' + ){{endif}} {{if 'cudaDevP2PAttrCudaArrayAccessSupported' in found_values}} - #: Accessing CUDA arrays over the link supported - cudaDevP2PAttrCudaArrayAccessSupported = cyruntime.cudaDeviceP2PAttr.cudaDevP2PAttrCudaArrayAccessSupported{{endif}} + cudaDevP2PAttrCudaArrayAccessSupported = ( + cyruntime.cudaDeviceP2PAttr.cudaDevP2PAttrCudaArrayAccessSupported, + 'Accessing CUDA arrays over the link supported\n' + ){{endif}} {{if 'cudaDevP2PAttrOnlyPartialNativeAtomicSupported' in found_values}} - #: Only some CUDA-valid atomic operations over the link are supported. - cudaDevP2PAttrOnlyPartialNativeAtomicSupported = cyruntime.cudaDeviceP2PAttr.cudaDevP2PAttrOnlyPartialNativeAtomicSupported{{endif}} + cudaDevP2PAttrOnlyPartialNativeAtomicSupported = ( + cyruntime.cudaDeviceP2PAttr.cudaDevP2PAttrOnlyPartialNativeAtomicSupported, + 'Only some CUDA-valid atomic operations over the link are supported.\n' + ){{endif}} -_dict_cudaDeviceP2PAttr = dict(((int(v), v) for k, v in cudaDeviceP2PAttr.__members__.items())) {{endif}} {{if 'cudaAtomicOperation' in found_types}} -class cudaAtomicOperation(IntEnum): +class cudaAtomicOperation(_FastEnum): """ CUDA-valid Atomic Operations """ @@ -4060,11 +5109,10 @@ class cudaAtomicOperation(IntEnum): {{if 'cudaAtomicOperationFloatMax' in found_values}} cudaAtomicOperationFloatMax = cyruntime.cudaAtomicOperation.cudaAtomicOperationFloatMax{{endif}} -_dict_cudaAtomicOperation = dict(((int(v), v) for k, v in cudaAtomicOperation.__members__.items())) {{endif}} {{if 'cudaAtomicOperationCapability' in found_types}} -class cudaAtomicOperationCapability(IntEnum): +class cudaAtomicOperationCapability(_FastEnum): """ CUDA-valid Atomic Operation capabilities """ @@ -4083,103 +5131,134 @@ class cudaAtomicOperationCapability(IntEnum): {{if 'cudaAtomicCapabilityVector32x4' in found_values}} cudaAtomicCapabilityVector32x4 = cyruntime.cudaAtomicOperationCapability.cudaAtomicCapabilityVector32x4{{endif}} -_dict_cudaAtomicOperationCapability = dict(((int(v), v) for k, v in cudaAtomicOperationCapability.__members__.items())) {{endif}} {{if 'cudaExternalMemoryHandleType' in found_types}} -class cudaExternalMemoryHandleType(IntEnum): +class cudaExternalMemoryHandleType(_FastEnum): """ External memory handle types """ {{if 'cudaExternalMemoryHandleTypeOpaqueFd' in found_values}} - #: Handle is an opaque file descriptor - cudaExternalMemoryHandleTypeOpaqueFd = cyruntime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeOpaqueFd{{endif}} + cudaExternalMemoryHandleTypeOpaqueFd = ( + cyruntime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeOpaqueFd, + 'Handle is an opaque file descriptor\n' + ){{endif}} {{if 'cudaExternalMemoryHandleTypeOpaqueWin32' in found_values}} - #: Handle is an opaque shared NT handle - cudaExternalMemoryHandleTypeOpaqueWin32 = cyruntime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeOpaqueWin32{{endif}} + cudaExternalMemoryHandleTypeOpaqueWin32 = ( + cyruntime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeOpaqueWin32, + 'Handle is an opaque shared NT handle\n' + ){{endif}} {{if 'cudaExternalMemoryHandleTypeOpaqueWin32Kmt' in found_values}} - #: Handle is an opaque, globally shared handle - cudaExternalMemoryHandleTypeOpaqueWin32Kmt = cyruntime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeOpaqueWin32Kmt{{endif}} + cudaExternalMemoryHandleTypeOpaqueWin32Kmt = ( + cyruntime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeOpaqueWin32Kmt, + 'Handle is an opaque, globally shared handle\n' + ){{endif}} {{if 'cudaExternalMemoryHandleTypeD3D12Heap' in found_values}} - #: Handle is a D3D12 heap object - cudaExternalMemoryHandleTypeD3D12Heap = cyruntime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeD3D12Heap{{endif}} + cudaExternalMemoryHandleTypeD3D12Heap = ( + cyruntime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeD3D12Heap, + 'Handle is a D3D12 heap object\n' + ){{endif}} {{if 'cudaExternalMemoryHandleTypeD3D12Resource' in found_values}} - #: Handle is a D3D12 committed resource - cudaExternalMemoryHandleTypeD3D12Resource = cyruntime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeD3D12Resource{{endif}} + cudaExternalMemoryHandleTypeD3D12Resource = ( + cyruntime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeD3D12Resource, + 'Handle is a D3D12 committed resource\n' + ){{endif}} {{if 'cudaExternalMemoryHandleTypeD3D11Resource' in found_values}} - #: Handle is a shared NT handle to a D3D11 resource - cudaExternalMemoryHandleTypeD3D11Resource = cyruntime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeD3D11Resource{{endif}} + cudaExternalMemoryHandleTypeD3D11Resource = ( + cyruntime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeD3D11Resource, + 'Handle is a shared NT handle to a D3D11 resource\n' + ){{endif}} {{if 'cudaExternalMemoryHandleTypeD3D11ResourceKmt' in found_values}} - #: Handle is a globally shared handle to a D3D11 resource - cudaExternalMemoryHandleTypeD3D11ResourceKmt = cyruntime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeD3D11ResourceKmt{{endif}} + cudaExternalMemoryHandleTypeD3D11ResourceKmt = ( + cyruntime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeD3D11ResourceKmt, + 'Handle is a globally shared handle to a D3D11 resource\n' + ){{endif}} {{if 'cudaExternalMemoryHandleTypeNvSciBuf' in found_values}} - #: Handle is an NvSciBuf object - cudaExternalMemoryHandleTypeNvSciBuf = cyruntime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeNvSciBuf{{endif}} + cudaExternalMemoryHandleTypeNvSciBuf = ( + cyruntime.cudaExternalMemoryHandleType.cudaExternalMemoryHandleTypeNvSciBuf, + 'Handle is an NvSciBuf object\n' + ){{endif}} -_dict_cudaExternalMemoryHandleType = dict(((int(v), v) for k, v in cudaExternalMemoryHandleType.__members__.items())) {{endif}} {{if 'cudaExternalSemaphoreHandleType' in found_types}} -class cudaExternalSemaphoreHandleType(IntEnum): +class cudaExternalSemaphoreHandleType(_FastEnum): """ External semaphore handle types """ {{if 'cudaExternalSemaphoreHandleTypeOpaqueFd' in found_values}} - #: Handle is an opaque file descriptor - cudaExternalSemaphoreHandleTypeOpaqueFd = cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeOpaqueFd{{endif}} + cudaExternalSemaphoreHandleTypeOpaqueFd = ( + cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeOpaqueFd, + 'Handle is an opaque file descriptor\n' + ){{endif}} {{if 'cudaExternalSemaphoreHandleTypeOpaqueWin32' in found_values}} - #: Handle is an opaque shared NT handle - cudaExternalSemaphoreHandleTypeOpaqueWin32 = cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeOpaqueWin32{{endif}} + cudaExternalSemaphoreHandleTypeOpaqueWin32 = ( + cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeOpaqueWin32, + 'Handle is an opaque shared NT handle\n' + ){{endif}} {{if 'cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt' in found_values}} - #: Handle is an opaque, globally shared handle - cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt = cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt{{endif}} + cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt = ( + cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt, + 'Handle is an opaque, globally shared handle\n' + ){{endif}} {{if 'cudaExternalSemaphoreHandleTypeD3D12Fence' in found_values}} - #: Handle is a shared NT handle referencing a D3D12 fence object - cudaExternalSemaphoreHandleTypeD3D12Fence = cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeD3D12Fence{{endif}} + cudaExternalSemaphoreHandleTypeD3D12Fence = ( + cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeD3D12Fence, + 'Handle is a shared NT handle referencing a D3D12 fence object\n' + ){{endif}} {{if 'cudaExternalSemaphoreHandleTypeD3D11Fence' in found_values}} - #: Handle is a shared NT handle referencing a D3D11 fence object - cudaExternalSemaphoreHandleTypeD3D11Fence = cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeD3D11Fence{{endif}} + cudaExternalSemaphoreHandleTypeD3D11Fence = ( + cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeD3D11Fence, + 'Handle is a shared NT handle referencing a D3D11 fence object\n' + ){{endif}} {{if 'cudaExternalSemaphoreHandleTypeNvSciSync' in found_values}} - #: Opaque handle to NvSciSync Object - cudaExternalSemaphoreHandleTypeNvSciSync = cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeNvSciSync{{endif}} + cudaExternalSemaphoreHandleTypeNvSciSync = ( + cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeNvSciSync, + 'Opaque handle to NvSciSync Object\n' + ){{endif}} {{if 'cudaExternalSemaphoreHandleTypeKeyedMutex' in found_values}} - #: Handle is a shared NT handle referencing a D3D11 keyed mutex object - cudaExternalSemaphoreHandleTypeKeyedMutex = cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeKeyedMutex{{endif}} + cudaExternalSemaphoreHandleTypeKeyedMutex = ( + cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeKeyedMutex, + 'Handle is a shared NT handle referencing a D3D11 keyed mutex object\n' + ){{endif}} {{if 'cudaExternalSemaphoreHandleTypeKeyedMutexKmt' in found_values}} - #: Handle is a shared KMT handle referencing a D3D11 keyed mutex object - cudaExternalSemaphoreHandleTypeKeyedMutexKmt = cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeKeyedMutexKmt{{endif}} + cudaExternalSemaphoreHandleTypeKeyedMutexKmt = ( + cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeKeyedMutexKmt, + 'Handle is a shared KMT handle referencing a D3D11 keyed mutex object\n' + ){{endif}} {{if 'cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd' in found_values}} - #: Handle is an opaque handle file descriptor referencing a timeline - #: semaphore - cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd = cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd{{endif}} + cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd = ( + cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd, + 'Handle is an opaque handle file descriptor referencing a timeline semaphore\n' + ){{endif}} {{if 'cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32' in found_values}} - #: Handle is an opaque handle file descriptor referencing a timeline - #: semaphore - cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 = cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32{{endif}} + cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 = ( + cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32, + 'Handle is an opaque handle file descriptor referencing a timeline semaphore\n' + ){{endif}} -_dict_cudaExternalSemaphoreHandleType = dict(((int(v), v) for k, v in cudaExternalSemaphoreHandleType.__members__.items())) {{endif}} {{if 'cudaDevSmResourceGroup_flags' in found_types}} -class cudaDevSmResourceGroup_flags(IntEnum): +class cudaDevSmResourceGroup_flags(_FastEnum): """ """ @@ -4188,11 +5267,10 @@ class cudaDevSmResourceGroup_flags(IntEnum): {{if 'cudaDevSmResourceGroupBackfill' in found_values}} cudaDevSmResourceGroupBackfill = cyruntime.cudaDevSmResourceGroup_flags.cudaDevSmResourceGroupBackfill{{endif}} -_dict_cudaDevSmResourceGroup_flags = dict(((int(v), v) for k, v in cudaDevSmResourceGroup_flags.__members__.items())) {{endif}} {{if 'cudaDevSmResourceSplitByCount_flags' in found_types}} -class cudaDevSmResourceSplitByCount_flags(IntEnum): +class cudaDevSmResourceSplitByCount_flags(_FastEnum): """ """ @@ -4201,11 +5279,10 @@ class cudaDevSmResourceSplitByCount_flags(IntEnum): {{if 'cudaDevSmResourceSplitMaxPotentialClusterSize' in found_values}} cudaDevSmResourceSplitMaxPotentialClusterSize = cyruntime.cudaDevSmResourceSplitByCount_flags.cudaDevSmResourceSplitMaxPotentialClusterSize{{endif}} -_dict_cudaDevSmResourceSplitByCount_flags = dict(((int(v), v) for k, v in cudaDevSmResourceSplitByCount_flags.__members__.items())) {{endif}} {{if 'cudaDevResourceType' in found_types}} -class cudaDevResourceType(IntEnum): +class cudaDevResourceType(_FastEnum): """ Type of resource """ @@ -4213,190 +5290,225 @@ class cudaDevResourceType(IntEnum): cudaDevResourceTypeInvalid = cyruntime.cudaDevResourceType.cudaDevResourceTypeInvalid{{endif}} {{if 'cudaDevResourceTypeSm' in found_values}} - #: Streaming multiprocessors related information - cudaDevResourceTypeSm = cyruntime.cudaDevResourceType.cudaDevResourceTypeSm{{endif}} + cudaDevResourceTypeSm = ( + cyruntime.cudaDevResourceType.cudaDevResourceTypeSm, + 'Streaming multiprocessors related information\n' + ){{endif}} {{if 'cudaDevResourceTypeWorkqueueConfig' in found_values}} - #: Workqueue configuration related information - cudaDevResourceTypeWorkqueueConfig = cyruntime.cudaDevResourceType.cudaDevResourceTypeWorkqueueConfig{{endif}} + cudaDevResourceTypeWorkqueueConfig = ( + cyruntime.cudaDevResourceType.cudaDevResourceTypeWorkqueueConfig, + 'Workqueue configuration related information\n' + ){{endif}} {{if 'cudaDevResourceTypeWorkqueue' in found_values}} - #: Pre-existing workqueue related information - cudaDevResourceTypeWorkqueue = cyruntime.cudaDevResourceType.cudaDevResourceTypeWorkqueue{{endif}} + cudaDevResourceTypeWorkqueue = ( + cyruntime.cudaDevResourceType.cudaDevResourceTypeWorkqueue, + 'Pre-existing workqueue related information\n' + ){{endif}} -_dict_cudaDevResourceType = dict(((int(v), v) for k, v in cudaDevResourceType.__members__.items())) {{endif}} {{if 'cudaDevWorkqueueConfigScope' in found_types}} -class cudaDevWorkqueueConfigScope(IntEnum): +class cudaDevWorkqueueConfigScope(_FastEnum): """ Sharing scope for workqueues """ {{if 'cudaDevWorkqueueConfigScopeDeviceCtx' in found_values}} - #: Use all shared workqueue resources on the device. Default driver - #: behaviour. - cudaDevWorkqueueConfigScopeDeviceCtx = cyruntime.cudaDevWorkqueueConfigScope.cudaDevWorkqueueConfigScopeDeviceCtx{{endif}} + cudaDevWorkqueueConfigScopeDeviceCtx = ( + cyruntime.cudaDevWorkqueueConfigScope.cudaDevWorkqueueConfigScopeDeviceCtx, + 'Use all shared workqueue resources on the device. Default driver behaviour.\n' + ){{endif}} {{if 'cudaDevWorkqueueConfigScopeGreenCtxBalanced' in found_values}} - #: When possible, use non-overlapping workqueue resources with other - #: balanced green contexts. - cudaDevWorkqueueConfigScopeGreenCtxBalanced = cyruntime.cudaDevWorkqueueConfigScope.cudaDevWorkqueueConfigScopeGreenCtxBalanced{{endif}} + cudaDevWorkqueueConfigScopeGreenCtxBalanced = ( + cyruntime.cudaDevWorkqueueConfigScope.cudaDevWorkqueueConfigScopeGreenCtxBalanced, + 'When possible, use non-overlapping workqueue resources with other balanced\n' + 'green contexts.\n' + ){{endif}} -_dict_cudaDevWorkqueueConfigScope = dict(((int(v), v) for k, v in cudaDevWorkqueueConfigScope.__members__.items())) {{endif}} {{if 'cudaJitOption' in found_types}} -class cudaJitOption(IntEnum): +class cudaJitOption(_FastEnum): """ Online compiler and linker options """ {{if 'cudaJitMaxRegisters' in found_values}} - #: Max number of registers that a thread may use. - #: Option type: unsigned int - #: Applies to: compiler only - cudaJitMaxRegisters = cyruntime.cudaJitOption.cudaJitMaxRegisters{{endif}} + cudaJitMaxRegisters = ( + cyruntime.cudaJitOption.cudaJitMaxRegisters, + 'Max number of registers that a thread may use.\n' + 'Option type: unsigned int\n' + 'Applies to: compiler only\n' + ){{endif}} {{if 'cudaJitThreadsPerBlock' in found_values}} - #: IN: Specifies minimum number of threads per block to target - #: compilation for - #: OUT: Returns the number of threads the compiler actually targeted. - #: This restricts the resource utilization of the compiler (e.g. max - #: registers) such that a block with the given number of threads should - #: be able to launch based on register limitations. Note, this option - #: does not currently take into account any other resource limitations, - #: such as shared memory utilization. - #: Option type: unsigned int - #: Applies to: compiler only - cudaJitThreadsPerBlock = cyruntime.cudaJitOption.cudaJitThreadsPerBlock{{endif}} + cudaJitThreadsPerBlock = ( + cyruntime.cudaJitOption.cudaJitThreadsPerBlock, + 'IN: Specifies minimum number of threads per block to target compilation for\n' + 'OUT: Returns the number of threads the compiler actually targeted. This\n' + 'restricts the resource utilization of the compiler (e.g. max registers)\n' + 'such that a block with the given number of threads should be able to launch\n' + 'based on register limitations. Note, this option does not currently take\n' + 'into account any other resource limitations, such as shared memory\n' + 'utilization.\n' + 'Option type: unsigned int\n' + 'Applies to: compiler only\n' + ){{endif}} {{if 'cudaJitWallTime' in found_values}} - #: Overwrites the option value with the total wall clock time, in - #: milliseconds, spent in the compiler and linker - #: Option type: float - #: Applies to: compiler and linker - cudaJitWallTime = cyruntime.cudaJitOption.cudaJitWallTime{{endif}} + cudaJitWallTime = ( + cyruntime.cudaJitOption.cudaJitWallTime, + 'Overwrites the option value with the total wall clock time, in\n' + 'milliseconds, spent in the compiler and linker\n' + 'Option type: float\n' + 'Applies to: compiler and linker\n' + ){{endif}} {{if 'cudaJitInfoLogBuffer' in found_values}} - #: Pointer to a buffer in which to print any log messages that are - #: informational in nature (the buffer size is specified via option - #: :py:obj:`~.cudaJitInfoLogBufferSizeBytes`) - #: Option type: char * - #: Applies to: compiler and linker - cudaJitInfoLogBuffer = cyruntime.cudaJitOption.cudaJitInfoLogBuffer{{endif}} + cudaJitInfoLogBuffer = ( + cyruntime.cudaJitOption.cudaJitInfoLogBuffer, + 'Pointer to a buffer in which to print any log messages that are\n' + 'informational in nature (the buffer size is specified via option\n' + ':py:obj:`~.cudaJitInfoLogBufferSizeBytes`)\n' + 'Option type: char *\n' + 'Applies to: compiler and linker\n' + ){{endif}} {{if 'cudaJitInfoLogBufferSizeBytes' in found_values}} - #: IN: Log buffer size in bytes. Log messages will be capped at this - #: size (including null terminator) - #: OUT: Amount of log buffer filled with messages - #: Option type: unsigned int - #: Applies to: compiler and linker - cudaJitInfoLogBufferSizeBytes = cyruntime.cudaJitOption.cudaJitInfoLogBufferSizeBytes{{endif}} + cudaJitInfoLogBufferSizeBytes = ( + cyruntime.cudaJitOption.cudaJitInfoLogBufferSizeBytes, + 'IN: Log buffer size in bytes. Log messages will be capped at this size\n' + '(including null terminator)\n' + 'OUT: Amount of log buffer filled with messages\n' + 'Option type: unsigned int\n' + 'Applies to: compiler and linker\n' + ){{endif}} {{if 'cudaJitErrorLogBuffer' in found_values}} - #: Pointer to a buffer in which to print any log messages that reflect - #: errors (the buffer size is specified via option - #: :py:obj:`~.cudaJitErrorLogBufferSizeBytes`) - #: Option type: char * - #: Applies to: compiler and linker - cudaJitErrorLogBuffer = cyruntime.cudaJitOption.cudaJitErrorLogBuffer{{endif}} + cudaJitErrorLogBuffer = ( + cyruntime.cudaJitOption.cudaJitErrorLogBuffer, + 'Pointer to a buffer in which to print any log messages that reflect errors\n' + '(the buffer size is specified via option\n' + ':py:obj:`~.cudaJitErrorLogBufferSizeBytes`)\n' + 'Option type: char *\n' + 'Applies to: compiler and linker\n' + ){{endif}} {{if 'cudaJitErrorLogBufferSizeBytes' in found_values}} - #: IN: Log buffer size in bytes. Log messages will be capped at this - #: size (including null terminator) - #: OUT: Amount of log buffer filled with messages - #: Option type: unsigned int - #: Applies to: compiler and linker - cudaJitErrorLogBufferSizeBytes = cyruntime.cudaJitOption.cudaJitErrorLogBufferSizeBytes{{endif}} + cudaJitErrorLogBufferSizeBytes = ( + cyruntime.cudaJitOption.cudaJitErrorLogBufferSizeBytes, + 'IN: Log buffer size in bytes. Log messages will be capped at this size\n' + '(including null terminator)\n' + 'OUT: Amount of log buffer filled with messages\n' + 'Option type: unsigned int\n' + 'Applies to: compiler and linker\n' + ){{endif}} {{if 'cudaJitOptimizationLevel' in found_values}} - #: Level of optimizations to apply to generated code (0 - 4), with 4 - #: being the default and highest level of optimizations. - #: Option type: unsigned int - #: Applies to: compiler only - cudaJitOptimizationLevel = cyruntime.cudaJitOption.cudaJitOptimizationLevel{{endif}} + cudaJitOptimizationLevel = ( + cyruntime.cudaJitOption.cudaJitOptimizationLevel, + 'Level of optimizations to apply to generated code (0 - 4), with 4 being the\n' + 'default and highest level of optimizations.\n' + 'Option type: unsigned int\n' + 'Applies to: compiler only\n' + ){{endif}} {{if 'cudaJitFallbackStrategy' in found_values}} - #: Specifies choice of fallback strategy if matching cubin is not - #: found. Choice is based on supplied :py:obj:`~.cudaJit_Fallback`. - #: Option type: unsigned int for enumerated type - #: :py:obj:`~.cudaJit_Fallback` - #: Applies to: compiler only - cudaJitFallbackStrategy = cyruntime.cudaJitOption.cudaJitFallbackStrategy{{endif}} + cudaJitFallbackStrategy = ( + cyruntime.cudaJitOption.cudaJitFallbackStrategy, + 'Specifies choice of fallback strategy if matching cubin is not found.\n' + 'Choice is based on supplied :py:obj:`~.cudaJit_Fallback`. Option type:\n' + 'unsigned int for enumerated type :py:obj:`~.cudaJit_Fallback`\n' + 'Applies to: compiler only\n' + ){{endif}} {{if 'cudaJitGenerateDebugInfo' in found_values}} - #: Specifies whether to create debug information in output (-g) (0: - #: false, default) - #: Option type: int - #: Applies to: compiler and linker - cudaJitGenerateDebugInfo = cyruntime.cudaJitOption.cudaJitGenerateDebugInfo{{endif}} + cudaJitGenerateDebugInfo = ( + cyruntime.cudaJitOption.cudaJitGenerateDebugInfo, + 'Specifies whether to create debug information in output (-g) (0: false,\n' + 'default)\n' + 'Option type: int\n' + 'Applies to: compiler and linker\n' + ){{endif}} {{if 'cudaJitLogVerbose' in found_values}} - #: Generate verbose log messages (0: false, default) - #: Option type: int - #: Applies to: compiler and linker - cudaJitLogVerbose = cyruntime.cudaJitOption.cudaJitLogVerbose{{endif}} + cudaJitLogVerbose = ( + cyruntime.cudaJitOption.cudaJitLogVerbose, + 'Generate verbose log messages (0: false, default)\n' + 'Option type: int\n' + 'Applies to: compiler and linker\n' + ){{endif}} {{if 'cudaJitGenerateLineInfo' in found_values}} - #: Generate line number information (-lineinfo) (0: false, default) - #: Option type: int - #: Applies to: compiler only - cudaJitGenerateLineInfo = cyruntime.cudaJitOption.cudaJitGenerateLineInfo{{endif}} + cudaJitGenerateLineInfo = ( + cyruntime.cudaJitOption.cudaJitGenerateLineInfo, + 'Generate line number information (-lineinfo) (0: false, default)\n' + 'Option type: int\n' + 'Applies to: compiler only\n' + ){{endif}} {{if 'cudaJitCacheMode' in found_values}} - #: Specifies whether to enable caching explicitly (-dlcm) - #: Choice is based on supplied :py:obj:`~.cudaJit_CacheMode`. - #: Option type: unsigned int for enumerated type - #: :py:obj:`~.cudaJit_CacheMode` - #: Applies to: compiler only - cudaJitCacheMode = cyruntime.cudaJitOption.cudaJitCacheMode{{endif}} + cudaJitCacheMode = ( + cyruntime.cudaJitOption.cudaJitCacheMode, + 'Specifies whether to enable caching explicitly (-dlcm)\n' + 'Choice is based on supplied :py:obj:`~.cudaJit_CacheMode`.\n' + 'Option type: unsigned int for enumerated type :py:obj:`~.cudaJit_CacheMode`\n' + 'Applies to: compiler only\n' + ){{endif}} {{if 'cudaJitPositionIndependentCode' in found_values}} - #: Generate position independent code (0: false) - #: Option type: int - #: Applies to: compiler only - cudaJitPositionIndependentCode = cyruntime.cudaJitOption.cudaJitPositionIndependentCode{{endif}} + cudaJitPositionIndependentCode = ( + cyruntime.cudaJitOption.cudaJitPositionIndependentCode, + 'Generate position independent code (0: false)\n' + 'Option type: int\n' + 'Applies to: compiler only\n' + ){{endif}} {{if 'cudaJitMinCtaPerSm' in found_values}} - #: This option hints to the JIT compiler the minimum number of CTAs - #: from the kernel’s grid to be mapped to a SM. This option is ignored - #: when used together with :py:obj:`~.cudaJitMaxRegisters` or - #: :py:obj:`~.cudaJitThreadsPerBlock`. Optimizations based on this - #: option need :py:obj:`~.cudaJitMaxThreadsPerBlock` to be specified as - #: well. For kernels already using PTX directive .minnctapersm, this - #: option will be ignored by default. Use - #: :py:obj:`~.cudaJitOverrideDirectiveValues` to let this option take - #: precedence over the PTX directive. Option type: unsigned int - #: Applies to: compiler only - cudaJitMinCtaPerSm = cyruntime.cudaJitOption.cudaJitMinCtaPerSm{{endif}} + cudaJitMinCtaPerSm = ( + cyruntime.cudaJitOption.cudaJitMinCtaPerSm, + 'This option hints to the JIT compiler the minimum number of CTAs from the\n' + 'kernel’s grid to be mapped to a SM. This option is ignored when used\n' + 'together with :py:obj:`~.cudaJitMaxRegisters` or\n' + ':py:obj:`~.cudaJitThreadsPerBlock`. Optimizations based on this option need\n' + ':py:obj:`~.cudaJitMaxThreadsPerBlock` to be specified as well. For kernels\n' + 'already using PTX directive .minnctapersm, this option will be ignored by\n' + 'default. Use :py:obj:`~.cudaJitOverrideDirectiveValues` to let this option\n' + 'take precedence over the PTX directive. Option type: unsigned int\n' + 'Applies to: compiler only\n' + ){{endif}} {{if 'cudaJitMaxThreadsPerBlock' in found_values}} - #: Maximum number threads in a thread block, computed as the product of - #: the maximum extent specifed for each dimension of the block. This - #: limit is guaranteed not to be exeeded in any invocation of the - #: kernel. Exceeding the the maximum number of threads results in - #: runtime error or kernel launch failure. For kernels already using - #: PTX directive .maxntid, this option will be ignored by default. Use - #: :py:obj:`~.cudaJitOverrideDirectiveValues` to let this option take - #: precedence over the PTX directive. Option type: int - #: Applies to: compiler only - cudaJitMaxThreadsPerBlock = cyruntime.cudaJitOption.cudaJitMaxThreadsPerBlock{{endif}} + cudaJitMaxThreadsPerBlock = ( + cyruntime.cudaJitOption.cudaJitMaxThreadsPerBlock, + 'Maximum number threads in a thread block, computed as the product of the\n' + 'maximum extent specifed for each dimension of the block. This limit is\n' + 'guaranteed not to be exeeded in any invocation of the kernel. Exceeding the\n' + 'the maximum number of threads results in runtime error or kernel launch\n' + 'failure. For kernels already using PTX directive .maxntid, this option will\n' + 'be ignored by default. Use :py:obj:`~.cudaJitOverrideDirectiveValues` to\n' + 'let this option take precedence over the PTX directive. Option type: int\n' + 'Applies to: compiler only\n' + ){{endif}} {{if 'cudaJitOverrideDirectiveValues' in found_values}} - #: This option lets the values specified using - #: :py:obj:`~.cudaJitMaxRegisters`, :py:obj:`~.cudaJitThreadsPerBlock`, - #: :py:obj:`~.cudaJitMaxThreadsPerBlock` and - #: :py:obj:`~.cudaJitMinCtaPerSm` take precedence over any PTX - #: directives. (0: Disable, default; 1: Enable) Option type: int - #: Applies to: compiler only - cudaJitOverrideDirectiveValues = cyruntime.cudaJitOption.cudaJitOverrideDirectiveValues{{endif}} + cudaJitOverrideDirectiveValues = ( + cyruntime.cudaJitOption.cudaJitOverrideDirectiveValues, + 'This option lets the values specified using\n' + ':py:obj:`~.cudaJitMaxRegisters`, :py:obj:`~.cudaJitThreadsPerBlock`,\n' + ':py:obj:`~.cudaJitMaxThreadsPerBlock` and :py:obj:`~.cudaJitMinCtaPerSm`\n' + 'take precedence over any PTX directives. (0: Disable, default; 1: Enable)\n' + 'Option type: int\n' + 'Applies to: compiler only\n' + ){{endif}} -_dict_cudaJitOption = dict(((int(v), v) for k, v in cudaJitOption.__members__.items())) {{endif}} {{if 'cudaLibraryOption' in found_types}} -class cudaLibraryOption(IntEnum): +class cudaLibraryOption(_FastEnum): """ Library options to be specified with :py:obj:`~.cudaLibraryLoadData()` or @@ -4406,311 +5518,376 @@ class cudaLibraryOption(IntEnum): cudaLibraryHostUniversalFunctionAndDataTable = cyruntime.cudaLibraryOption.cudaLibraryHostUniversalFunctionAndDataTable{{endif}} {{if 'cudaLibraryBinaryIsPreserved' in found_values}} - #: Specifes that the argument `code` passed to - #: :py:obj:`~.cudaLibraryLoadData()` will be preserved. Specifying this - #: option will let the driver know that `code` can be accessed at any - #: point until :py:obj:`~.cudaLibraryUnload()`. The default behavior is - #: for the driver to allocate and maintain its own copy of `code`. Note - #: that this is only a memory usage optimization hint and the driver - #: can choose to ignore it if required. Specifying this option with - #: :py:obj:`~.cudaLibraryLoadFromFile()` is invalid and will return - #: :py:obj:`~.cudaErrorInvalidValue`. - cudaLibraryBinaryIsPreserved = cyruntime.cudaLibraryOption.cudaLibraryBinaryIsPreserved{{endif}} + cudaLibraryBinaryIsPreserved = ( + cyruntime.cudaLibraryOption.cudaLibraryBinaryIsPreserved, + 'Specifes that the argument `code` passed to\n' + ':py:obj:`~.cudaLibraryLoadData()` will be preserved. Specifying this option\n' + 'will let the driver know that `code` can be accessed at any point until\n' + ':py:obj:`~.cudaLibraryUnload()`. The default behavior is for the driver to\n' + 'allocate and maintain its own copy of `code`. Note that this is only a\n' + 'memory usage optimization hint and the driver can choose to ignore it if\n' + 'required. Specifying this option with :py:obj:`~.cudaLibraryLoadFromFile()`\n' + 'is invalid and will return :py:obj:`~.cudaErrorInvalidValue`.\n' + ){{endif}} -_dict_cudaLibraryOption = dict(((int(v), v) for k, v in cudaLibraryOption.__members__.items())) {{endif}} {{if 'cudaJit_CacheMode' in found_types}} -class cudaJit_CacheMode(IntEnum): +class cudaJit_CacheMode(_FastEnum): """ Caching modes for dlcm """ {{if 'cudaJitCacheOptionNone' in found_values}} - #: Compile with no -dlcm flag specified - cudaJitCacheOptionNone = cyruntime.cudaJit_CacheMode.cudaJitCacheOptionNone{{endif}} + cudaJitCacheOptionNone = ( + cyruntime.cudaJit_CacheMode.cudaJitCacheOptionNone, + 'Compile with no -dlcm flag specified\n' + ){{endif}} {{if 'cudaJitCacheOptionCG' in found_values}} - #: Compile with L1 cache disabled - cudaJitCacheOptionCG = cyruntime.cudaJit_CacheMode.cudaJitCacheOptionCG{{endif}} + cudaJitCacheOptionCG = ( + cyruntime.cudaJit_CacheMode.cudaJitCacheOptionCG, + 'Compile with L1 cache disabled\n' + ){{endif}} {{if 'cudaJitCacheOptionCA' in found_values}} - #: Compile with L1 cache enabled - cudaJitCacheOptionCA = cyruntime.cudaJit_CacheMode.cudaJitCacheOptionCA{{endif}} + cudaJitCacheOptionCA = ( + cyruntime.cudaJit_CacheMode.cudaJitCacheOptionCA, + 'Compile with L1 cache enabled\n' + ){{endif}} -_dict_cudaJit_CacheMode = dict(((int(v), v) for k, v in cudaJit_CacheMode.__members__.items())) {{endif}} {{if 'cudaJit_Fallback' in found_types}} -class cudaJit_Fallback(IntEnum): +class cudaJit_Fallback(_FastEnum): """ Cubin matching fallback strategies """ {{if 'cudaPreferPtx' in found_values}} - #: Prefer to compile ptx if exact binary match not found - cudaPreferPtx = cyruntime.cudaJit_Fallback.cudaPreferPtx{{endif}} + cudaPreferPtx = ( + cyruntime.cudaJit_Fallback.cudaPreferPtx, + 'Prefer to compile ptx if exact binary match not found\n' + ){{endif}} {{if 'cudaPreferBinary' in found_values}} - #: Prefer to fall back to compatible binary code if exact match not - #: found - cudaPreferBinary = cyruntime.cudaJit_Fallback.cudaPreferBinary{{endif}} + cudaPreferBinary = ( + cyruntime.cudaJit_Fallback.cudaPreferBinary, + 'Prefer to fall back to compatible binary code if exact match not found\n' + ){{endif}} -_dict_cudaJit_Fallback = dict(((int(v), v) for k, v in cudaJit_Fallback.__members__.items())) {{endif}} {{if 'cudaCGScope' in found_types}} -class cudaCGScope(IntEnum): +class cudaCGScope(_FastEnum): """ CUDA cooperative group scope """ {{if 'cudaCGScopeInvalid' in found_values}} - #: Invalid cooperative group scope - cudaCGScopeInvalid = cyruntime.cudaCGScope.cudaCGScopeInvalid{{endif}} + cudaCGScopeInvalid = ( + cyruntime.cudaCGScope.cudaCGScopeInvalid, + 'Invalid cooperative group scope\n' + ){{endif}} {{if 'cudaCGScopeGrid' in found_values}} - #: Scope represented by a grid_group - cudaCGScopeGrid = cyruntime.cudaCGScope.cudaCGScopeGrid{{endif}} + cudaCGScopeGrid = ( + cyruntime.cudaCGScope.cudaCGScopeGrid, + 'Scope represented by a grid_group\n' + ){{endif}} {{if 'cudaCGScopeReserved' in found_values}} - #: Reserved - cudaCGScopeReserved = cyruntime.cudaCGScope.cudaCGScopeReserved{{endif}} + cudaCGScopeReserved = ( + cyruntime.cudaCGScope.cudaCGScopeReserved, + 'Reserved\n' + ){{endif}} -_dict_cudaCGScope = dict(((int(v), v) for k, v in cudaCGScope.__members__.items())) {{endif}} {{if 'cudaGraphConditionalHandleFlags' in found_types}} -class cudaGraphConditionalHandleFlags(IntEnum): +class cudaGraphConditionalHandleFlags(_FastEnum): """ """ {{if 'cudaGraphCondAssignDefault' in found_values}} - #: Apply default handle value when graph is launched. - cudaGraphCondAssignDefault = cyruntime.cudaGraphConditionalHandleFlags.cudaGraphCondAssignDefault{{endif}} + cudaGraphCondAssignDefault = ( + cyruntime.cudaGraphConditionalHandleFlags.cudaGraphCondAssignDefault, + 'Apply default handle value when graph is launched.\n' + ){{endif}} -_dict_cudaGraphConditionalHandleFlags = dict(((int(v), v) for k, v in cudaGraphConditionalHandleFlags.__members__.items())) {{endif}} {{if 'cudaGraphConditionalNodeType' in found_types}} -class cudaGraphConditionalNodeType(IntEnum): +class cudaGraphConditionalNodeType(_FastEnum): """ CUDA conditional node types """ {{if 'cudaGraphCondTypeIf' in found_values}} - #: Conditional 'if/else' Node. Body[0] executed if condition is non- - #: zero. If `size` == 2, an optional ELSE graph is created and this is - #: executed if the condition is zero. - cudaGraphCondTypeIf = cyruntime.cudaGraphConditionalNodeType.cudaGraphCondTypeIf{{endif}} + cudaGraphCondTypeIf = ( + cyruntime.cudaGraphConditionalNodeType.cudaGraphCondTypeIf, + "Conditional 'if/else' Node. Body[0] executed if condition is non-zero. If\n" + '`size` == 2, an optional ELSE graph is created and this is executed if the\n' + 'condition is zero.\n' + ){{endif}} {{if 'cudaGraphCondTypeWhile' in found_values}} - #: Conditional 'while' Node. Body executed repeatedly while condition - #: value is non-zero. - cudaGraphCondTypeWhile = cyruntime.cudaGraphConditionalNodeType.cudaGraphCondTypeWhile{{endif}} + cudaGraphCondTypeWhile = ( + cyruntime.cudaGraphConditionalNodeType.cudaGraphCondTypeWhile, + "Conditional 'while' Node. Body executed repeatedly while condition value is\n" + 'non-zero.\n' + ){{endif}} {{if 'cudaGraphCondTypeSwitch' in found_values}} - #: Conditional 'switch' Node. Body[n] is executed once, where 'n' is - #: the value of the condition. If the condition does not match a body - #: index, no body is launched. - cudaGraphCondTypeSwitch = cyruntime.cudaGraphConditionalNodeType.cudaGraphCondTypeSwitch{{endif}} + cudaGraphCondTypeSwitch = ( + cyruntime.cudaGraphConditionalNodeType.cudaGraphCondTypeSwitch, + "Conditional 'switch' Node. Body[n] is executed once, where 'n' is the value\n" + 'of the condition. If the condition does not match a body index, no body is\n' + 'launched.\n' + ){{endif}} -_dict_cudaGraphConditionalNodeType = dict(((int(v), v) for k, v in cudaGraphConditionalNodeType.__members__.items())) {{endif}} {{if 'cudaGraphNodeType' in found_types}} -class cudaGraphNodeType(IntEnum): +class cudaGraphNodeType(_FastEnum): """ CUDA Graph node types """ {{if 'cudaGraphNodeTypeKernel' in found_values}} - #: GPU kernel node - cudaGraphNodeTypeKernel = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeKernel{{endif}} + cudaGraphNodeTypeKernel = ( + cyruntime.cudaGraphNodeType.cudaGraphNodeTypeKernel, + 'GPU kernel node\n' + ){{endif}} {{if 'cudaGraphNodeTypeMemcpy' in found_values}} - #: Memcpy node - cudaGraphNodeTypeMemcpy = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeMemcpy{{endif}} + cudaGraphNodeTypeMemcpy = ( + cyruntime.cudaGraphNodeType.cudaGraphNodeTypeMemcpy, + 'Memcpy node\n' + ){{endif}} {{if 'cudaGraphNodeTypeMemset' in found_values}} - #: Memset node - cudaGraphNodeTypeMemset = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeMemset{{endif}} + cudaGraphNodeTypeMemset = ( + cyruntime.cudaGraphNodeType.cudaGraphNodeTypeMemset, + 'Memset node\n' + ){{endif}} {{if 'cudaGraphNodeTypeHost' in found_values}} - #: Host (executable) node - cudaGraphNodeTypeHost = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeHost{{endif}} + cudaGraphNodeTypeHost = ( + cyruntime.cudaGraphNodeType.cudaGraphNodeTypeHost, + 'Host (executable) node\n' + ){{endif}} {{if 'cudaGraphNodeTypeGraph' in found_values}} - #: Node which executes an embedded graph - cudaGraphNodeTypeGraph = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeGraph{{endif}} + cudaGraphNodeTypeGraph = ( + cyruntime.cudaGraphNodeType.cudaGraphNodeTypeGraph, + 'Node which executes an embedded graph\n' + ){{endif}} {{if 'cudaGraphNodeTypeEmpty' in found_values}} - #: Empty (no-op) node - cudaGraphNodeTypeEmpty = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeEmpty{{endif}} + cudaGraphNodeTypeEmpty = ( + cyruntime.cudaGraphNodeType.cudaGraphNodeTypeEmpty, + 'Empty (no-op) node\n' + ){{endif}} {{if 'cudaGraphNodeTypeWaitEvent' in found_values}} - #: External event wait node - cudaGraphNodeTypeWaitEvent = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeWaitEvent{{endif}} + cudaGraphNodeTypeWaitEvent = ( + cyruntime.cudaGraphNodeType.cudaGraphNodeTypeWaitEvent, + 'External event wait node\n' + ){{endif}} {{if 'cudaGraphNodeTypeEventRecord' in found_values}} - #: External event record node - cudaGraphNodeTypeEventRecord = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeEventRecord{{endif}} + cudaGraphNodeTypeEventRecord = ( + cyruntime.cudaGraphNodeType.cudaGraphNodeTypeEventRecord, + 'External event record node\n' + ){{endif}} {{if 'cudaGraphNodeTypeExtSemaphoreSignal' in found_values}} - #: External semaphore signal node - cudaGraphNodeTypeExtSemaphoreSignal = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeExtSemaphoreSignal{{endif}} + cudaGraphNodeTypeExtSemaphoreSignal = ( + cyruntime.cudaGraphNodeType.cudaGraphNodeTypeExtSemaphoreSignal, + 'External semaphore signal node\n' + ){{endif}} {{if 'cudaGraphNodeTypeExtSemaphoreWait' in found_values}} - #: External semaphore wait node - cudaGraphNodeTypeExtSemaphoreWait = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeExtSemaphoreWait{{endif}} + cudaGraphNodeTypeExtSemaphoreWait = ( + cyruntime.cudaGraphNodeType.cudaGraphNodeTypeExtSemaphoreWait, + 'External semaphore wait node\n' + ){{endif}} {{if 'cudaGraphNodeTypeMemAlloc' in found_values}} - #: Memory allocation node - cudaGraphNodeTypeMemAlloc = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeMemAlloc{{endif}} + cudaGraphNodeTypeMemAlloc = ( + cyruntime.cudaGraphNodeType.cudaGraphNodeTypeMemAlloc, + 'Memory allocation node\n' + ){{endif}} {{if 'cudaGraphNodeTypeMemFree' in found_values}} - #: Memory free node - cudaGraphNodeTypeMemFree = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeMemFree{{endif}} + cudaGraphNodeTypeMemFree = ( + cyruntime.cudaGraphNodeType.cudaGraphNodeTypeMemFree, + 'Memory free node\n' + ){{endif}} {{if 'cudaGraphNodeTypeConditional' in found_values}} - #: Conditional node May be used to - #: implement a conditional execution path or loop - #: inside of a graph. The graph(s) - #: contained within the body of the conditional node - #: can be selectively executed or - #: iterated upon based on the value of a conditional - #: variable. - #: - #: Handles must be created in - #: advance of creating the node - #: using - #: :py:obj:`~.cudaGraphConditionalHandleCreate`. - #: - #: The following restrictions apply - #: to graphs which contain conditional nodes: - #: The graph cannot be used in a - #: child node. - #: Only one instantiation of the - #: graph may exist at any point in time. - #: The graph cannot be cloned. - #: - #: To set the control value, supply - #: a default value when creating the handle and/or - #: call - #: :py:obj:`~.cudaGraphSetConditional` from device code. - cudaGraphNodeTypeConditional = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeConditional{{endif}} + cudaGraphNodeTypeConditional = ( + cyruntime.cudaGraphNodeType.cudaGraphNodeTypeConditional, + 'Conditional node May be used to\n' + 'implement a conditional execution path or loop\n' + ' inside of a graph. The graph(s)\n' + 'contained within the body of the conditional node\n' + ' can be selectively executed or iterated\n' + 'upon based on the value of a conditional\n' + ' variable.\n' + ' Handles must be created in advance of\n' + 'creating the node\n' + ' using\n' + ':py:obj:`~.cudaGraphConditionalHandleCreate`.\n' + ' The following restrictions apply to\n' + 'graphs which contain conditional nodes:\n' + ' The graph cannot be used in a child\n' + 'node.\n' + ' Only one instantiation of the graph\n' + 'may exist at any point in time.\n' + ' The graph cannot be cloned.\n' + ' To set the control value, supply a\n' + 'default value when creating the handle and/or\n' + ' call :py:obj:`~.cudaGraphSetConditional`\n' + 'from device code.\n' + ){{endif}} {{if 'cudaGraphNodeTypeCount' in found_values}} cudaGraphNodeTypeCount = cyruntime.cudaGraphNodeType.cudaGraphNodeTypeCount{{endif}} -_dict_cudaGraphNodeType = dict(((int(v), v) for k, v in cudaGraphNodeType.__members__.items())) {{endif}} {{if 'cudaGraphChildGraphNodeOwnership' in found_types}} -class cudaGraphChildGraphNodeOwnership(IntEnum): +class cudaGraphChildGraphNodeOwnership(_FastEnum): """ Child graph node ownership """ {{if 'cudaGraphChildGraphOwnershipClone' in found_values}} - #: Default behavior for a child graph node. Child graph is cloned into - #: the parent and memory allocation/free nodes can't be present in the - #: child graph. - cudaGraphChildGraphOwnershipClone = cyruntime.cudaGraphChildGraphNodeOwnership.cudaGraphChildGraphOwnershipClone{{endif}} + cudaGraphChildGraphOwnershipClone = ( + cyruntime.cudaGraphChildGraphNodeOwnership.cudaGraphChildGraphOwnershipClone, + 'Default behavior for a child graph node. Child graph is cloned into the\n' + "parent and memory allocation/free nodes can't be present in the child\n" + 'graph.\n' + ){{endif}} {{if 'cudaGraphChildGraphOwnershipMove' in found_values}} - #: The child graph is moved to the parent. The handle to the child - #: graph is owned by the parent and will be destroyed when the parent - #: is destroyed. - #: - #: The following restrictions apply to child graphs after they have - #: been moved: Cannot be independently instantiated or destroyed; - #: Cannot be added as a child graph of a separate parent graph; Cannot - #: be used as an argument to cudaGraphExecUpdate; Cannot have - #: additional memory allocation or free nodes added. - cudaGraphChildGraphOwnershipMove = cyruntime.cudaGraphChildGraphNodeOwnership.cudaGraphChildGraphOwnershipMove{{endif}} + cudaGraphChildGraphOwnershipMove = ( + cyruntime.cudaGraphChildGraphNodeOwnership.cudaGraphChildGraphOwnershipMove, + 'The child graph is moved to the parent. The handle to the child graph is\n' + 'owned by the parent and will be destroyed when the parent is destroyed.\n' + 'The following restrictions apply to child graphs after they have been\n' + 'moved: Cannot be independently instantiated or destroyed; Cannot be added\n' + 'as a child graph of a separate parent graph; Cannot be used as an argument\n' + 'to cudaGraphExecUpdate; Cannot have additional memory allocation or free\n' + 'nodes added.\n' + ){{endif}} -_dict_cudaGraphChildGraphNodeOwnership = dict(((int(v), v) for k, v in cudaGraphChildGraphNodeOwnership.__members__.items())) {{endif}} {{if 'cudaGraphExecUpdateResult' in found_types}} -class cudaGraphExecUpdateResult(IntEnum): +class cudaGraphExecUpdateResult(_FastEnum): """ CUDA Graph Update error types """ {{if 'cudaGraphExecUpdateSuccess' in found_values}} - #: The update succeeded - cudaGraphExecUpdateSuccess = cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateSuccess{{endif}} + cudaGraphExecUpdateSuccess = ( + cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateSuccess, + 'The update succeeded\n' + ){{endif}} {{if 'cudaGraphExecUpdateError' in found_values}} - #: The update failed for an unexpected reason which is described in the - #: return value of the function - cudaGraphExecUpdateError = cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateError{{endif}} + cudaGraphExecUpdateError = ( + cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateError, + 'The update failed for an unexpected reason which is described in the return\n' + 'value of the function\n' + ){{endif}} {{if 'cudaGraphExecUpdateErrorTopologyChanged' in found_values}} - #: The update failed because the topology changed - cudaGraphExecUpdateErrorTopologyChanged = cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorTopologyChanged{{endif}} + cudaGraphExecUpdateErrorTopologyChanged = ( + cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorTopologyChanged, + 'The update failed because the topology changed\n' + ){{endif}} {{if 'cudaGraphExecUpdateErrorNodeTypeChanged' in found_values}} - #: The update failed because a node type changed - cudaGraphExecUpdateErrorNodeTypeChanged = cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorNodeTypeChanged{{endif}} + cudaGraphExecUpdateErrorNodeTypeChanged = ( + cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorNodeTypeChanged, + 'The update failed because a node type changed\n' + ){{endif}} {{if 'cudaGraphExecUpdateErrorFunctionChanged' in found_values}} - #: The update failed because the function of a kernel node changed - #: (CUDA driver < 11.2) - cudaGraphExecUpdateErrorFunctionChanged = cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorFunctionChanged{{endif}} + cudaGraphExecUpdateErrorFunctionChanged = ( + cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorFunctionChanged, + 'The update failed because the function of a kernel node changed (CUDA\n' + 'driver < 11.2)\n' + ){{endif}} {{if 'cudaGraphExecUpdateErrorParametersChanged' in found_values}} - #: The update failed because the parameters changed in a way that is - #: not supported - cudaGraphExecUpdateErrorParametersChanged = cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorParametersChanged{{endif}} + cudaGraphExecUpdateErrorParametersChanged = ( + cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorParametersChanged, + 'The update failed because the parameters changed in a way that is not\n' + 'supported\n' + ){{endif}} {{if 'cudaGraphExecUpdateErrorNotSupported' in found_values}} - #: The update failed because something about the node is not supported - cudaGraphExecUpdateErrorNotSupported = cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorNotSupported{{endif}} + cudaGraphExecUpdateErrorNotSupported = ( + cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorNotSupported, + 'The update failed because something about the node is not supported\n' + ){{endif}} {{if 'cudaGraphExecUpdateErrorUnsupportedFunctionChange' in found_values}} - #: The update failed because the function of a kernel node changed in - #: an unsupported way - cudaGraphExecUpdateErrorUnsupportedFunctionChange = cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorUnsupportedFunctionChange{{endif}} + cudaGraphExecUpdateErrorUnsupportedFunctionChange = ( + cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorUnsupportedFunctionChange, + 'The update failed because the function of a kernel node changed in an\n' + 'unsupported way\n' + ){{endif}} {{if 'cudaGraphExecUpdateErrorAttributesChanged' in found_values}} - #: The update failed because the node attributes changed in a way that - #: is not supported - cudaGraphExecUpdateErrorAttributesChanged = cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorAttributesChanged{{endif}} + cudaGraphExecUpdateErrorAttributesChanged = ( + cyruntime.cudaGraphExecUpdateResult.cudaGraphExecUpdateErrorAttributesChanged, + 'The update failed because the node attributes changed in a way that is not\n' + 'supported\n' + ){{endif}} -_dict_cudaGraphExecUpdateResult = dict(((int(v), v) for k, v in cudaGraphExecUpdateResult.__members__.items())) {{endif}} {{if 'cudaGraphKernelNodeField' in found_types}} -class cudaGraphKernelNodeField(IntEnum): +class cudaGraphKernelNodeField(_FastEnum): """ Specifies the field to update when performing multiple node updates from the device """ {{if 'cudaGraphKernelNodeFieldInvalid' in found_values}} - #: Invalid field - cudaGraphKernelNodeFieldInvalid = cyruntime.cudaGraphKernelNodeField.cudaGraphKernelNodeFieldInvalid{{endif}} + cudaGraphKernelNodeFieldInvalid = ( + cyruntime.cudaGraphKernelNodeField.cudaGraphKernelNodeFieldInvalid, + 'Invalid field\n' + ){{endif}} {{if 'cudaGraphKernelNodeFieldGridDim' in found_values}} - #: Grid dimension update - cudaGraphKernelNodeFieldGridDim = cyruntime.cudaGraphKernelNodeField.cudaGraphKernelNodeFieldGridDim{{endif}} + cudaGraphKernelNodeFieldGridDim = ( + cyruntime.cudaGraphKernelNodeField.cudaGraphKernelNodeFieldGridDim, + 'Grid dimension update\n' + ){{endif}} {{if 'cudaGraphKernelNodeFieldParam' in found_values}} - #: Kernel parameter update - cudaGraphKernelNodeFieldParam = cyruntime.cudaGraphKernelNodeField.cudaGraphKernelNodeFieldParam{{endif}} + cudaGraphKernelNodeFieldParam = ( + cyruntime.cudaGraphKernelNodeField.cudaGraphKernelNodeFieldParam, + 'Kernel parameter update\n' + ){{endif}} {{if 'cudaGraphKernelNodeFieldEnabled' in found_values}} - #: Node enable/disable - cudaGraphKernelNodeFieldEnabled = cyruntime.cudaGraphKernelNodeField.cudaGraphKernelNodeFieldEnabled{{endif}} + cudaGraphKernelNodeFieldEnabled = ( + cyruntime.cudaGraphKernelNodeField.cudaGraphKernelNodeFieldEnabled, + 'Node enable/disable\n' + ){{endif}} -_dict_cudaGraphKernelNodeField = dict(((int(v), v) for k, v in cudaGraphKernelNodeField.__members__.items())) {{endif}} {{if 'cudaGetDriverEntryPointFlags' in found_types}} -class cudaGetDriverEntryPointFlags(IntEnum): +class cudaGetDriverEntryPointFlags(_FastEnum): """ Flags to specify search options to be used with :py:obj:`~.cudaGetDriverEntryPoint` For more details see @@ -4718,246 +5895,304 @@ class cudaGetDriverEntryPointFlags(IntEnum): """ {{if 'cudaEnableDefault' in found_values}} - #: Default search mode for driver symbols. - cudaEnableDefault = cyruntime.cudaGetDriverEntryPointFlags.cudaEnableDefault{{endif}} + cudaEnableDefault = ( + cyruntime.cudaGetDriverEntryPointFlags.cudaEnableDefault, + 'Default search mode for driver symbols.\n' + ){{endif}} {{if 'cudaEnableLegacyStream' in found_values}} - #: Search for legacy versions of driver symbols. - cudaEnableLegacyStream = cyruntime.cudaGetDriverEntryPointFlags.cudaEnableLegacyStream{{endif}} + cudaEnableLegacyStream = ( + cyruntime.cudaGetDriverEntryPointFlags.cudaEnableLegacyStream, + 'Search for legacy versions of driver symbols.\n' + ){{endif}} {{if 'cudaEnablePerThreadDefaultStream' in found_values}} - #: Search for per-thread versions of driver symbols. - cudaEnablePerThreadDefaultStream = cyruntime.cudaGetDriverEntryPointFlags.cudaEnablePerThreadDefaultStream{{endif}} + cudaEnablePerThreadDefaultStream = ( + cyruntime.cudaGetDriverEntryPointFlags.cudaEnablePerThreadDefaultStream, + 'Search for per-thread versions of driver symbols.\n' + ){{endif}} -_dict_cudaGetDriverEntryPointFlags = dict(((int(v), v) for k, v in cudaGetDriverEntryPointFlags.__members__.items())) {{endif}} {{if 'cudaDriverEntryPointQueryResult' in found_types}} -class cudaDriverEntryPointQueryResult(IntEnum): +class cudaDriverEntryPointQueryResult(_FastEnum): """ Enum for status from obtaining driver entry points, used with :py:obj:`~.cudaApiGetDriverEntryPoint` """ {{if 'cudaDriverEntryPointSuccess' in found_values}} - #: Search for symbol found a match - cudaDriverEntryPointSuccess = cyruntime.cudaDriverEntryPointQueryResult.cudaDriverEntryPointSuccess{{endif}} + cudaDriverEntryPointSuccess = ( + cyruntime.cudaDriverEntryPointQueryResult.cudaDriverEntryPointSuccess, + 'Search for symbol found a match\n' + ){{endif}} {{if 'cudaDriverEntryPointSymbolNotFound' in found_values}} - #: Search for symbol was not found - cudaDriverEntryPointSymbolNotFound = cyruntime.cudaDriverEntryPointQueryResult.cudaDriverEntryPointSymbolNotFound{{endif}} + cudaDriverEntryPointSymbolNotFound = ( + cyruntime.cudaDriverEntryPointQueryResult.cudaDriverEntryPointSymbolNotFound, + 'Search for symbol was not found\n' + ){{endif}} {{if 'cudaDriverEntryPointVersionNotSufficent' in found_values}} - #: Search for symbol was found but version wasn't great enough - cudaDriverEntryPointVersionNotSufficent = cyruntime.cudaDriverEntryPointQueryResult.cudaDriverEntryPointVersionNotSufficent{{endif}} + cudaDriverEntryPointVersionNotSufficent = ( + cyruntime.cudaDriverEntryPointQueryResult.cudaDriverEntryPointVersionNotSufficent, + "Search for symbol was found but version wasn't great enough\n" + ){{endif}} -_dict_cudaDriverEntryPointQueryResult = dict(((int(v), v) for k, v in cudaDriverEntryPointQueryResult.__members__.items())) {{endif}} {{if 'cudaGraphDebugDotFlags' in found_types}} -class cudaGraphDebugDotFlags(IntEnum): +class cudaGraphDebugDotFlags(_FastEnum): """ CUDA Graph debug write options """ {{if 'cudaGraphDebugDotFlagsVerbose' in found_values}} - #: Output all debug data as if every debug flag is enabled - cudaGraphDebugDotFlagsVerbose = cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsVerbose{{endif}} + cudaGraphDebugDotFlagsVerbose = ( + cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsVerbose, + 'Output all debug data as if every debug flag is enabled\n' + ){{endif}} {{if 'cudaGraphDebugDotFlagsKernelNodeParams' in found_values}} - #: Adds :py:obj:`~.cudaKernelNodeParams` to output - cudaGraphDebugDotFlagsKernelNodeParams = cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsKernelNodeParams{{endif}} + cudaGraphDebugDotFlagsKernelNodeParams = ( + cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsKernelNodeParams, + 'Adds :py:obj:`~.cudaKernelNodeParams` to output\n' + ){{endif}} {{if 'cudaGraphDebugDotFlagsMemcpyNodeParams' in found_values}} - #: Adds :py:obj:`~.cudaMemcpy3DParms` to output - cudaGraphDebugDotFlagsMemcpyNodeParams = cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsMemcpyNodeParams{{endif}} + cudaGraphDebugDotFlagsMemcpyNodeParams = ( + cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsMemcpyNodeParams, + 'Adds :py:obj:`~.cudaMemcpy3DParms` to output\n' + ){{endif}} {{if 'cudaGraphDebugDotFlagsMemsetNodeParams' in found_values}} - #: Adds :py:obj:`~.cudaMemsetParams` to output - cudaGraphDebugDotFlagsMemsetNodeParams = cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsMemsetNodeParams{{endif}} + cudaGraphDebugDotFlagsMemsetNodeParams = ( + cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsMemsetNodeParams, + 'Adds :py:obj:`~.cudaMemsetParams` to output\n' + ){{endif}} {{if 'cudaGraphDebugDotFlagsHostNodeParams' in found_values}} - #: Adds :py:obj:`~.cudaHostNodeParams` to output - cudaGraphDebugDotFlagsHostNodeParams = cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsHostNodeParams{{endif}} + cudaGraphDebugDotFlagsHostNodeParams = ( + cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsHostNodeParams, + 'Adds :py:obj:`~.cudaHostNodeParams` to output\n' + ){{endif}} {{if 'cudaGraphDebugDotFlagsEventNodeParams' in found_values}} - #: Adds cudaEvent_t handle from record and wait nodes to output - cudaGraphDebugDotFlagsEventNodeParams = cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsEventNodeParams{{endif}} + cudaGraphDebugDotFlagsEventNodeParams = ( + cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsEventNodeParams, + 'Adds cudaEvent_t handle from record and wait nodes to output\n' + ){{endif}} {{if 'cudaGraphDebugDotFlagsExtSemasSignalNodeParams' in found_values}} - #: Adds :py:obj:`~.cudaExternalSemaphoreSignalNodeParams` values to - #: output - cudaGraphDebugDotFlagsExtSemasSignalNodeParams = cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsExtSemasSignalNodeParams{{endif}} + cudaGraphDebugDotFlagsExtSemasSignalNodeParams = ( + cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsExtSemasSignalNodeParams, + 'Adds :py:obj:`~.cudaExternalSemaphoreSignalNodeParams` values to output\n' + ){{endif}} {{if 'cudaGraphDebugDotFlagsExtSemasWaitNodeParams' in found_values}} - #: Adds :py:obj:`~.cudaExternalSemaphoreWaitNodeParams` to output - cudaGraphDebugDotFlagsExtSemasWaitNodeParams = cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsExtSemasWaitNodeParams{{endif}} + cudaGraphDebugDotFlagsExtSemasWaitNodeParams = ( + cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsExtSemasWaitNodeParams, + 'Adds :py:obj:`~.cudaExternalSemaphoreWaitNodeParams` to output\n' + ){{endif}} {{if 'cudaGraphDebugDotFlagsKernelNodeAttributes' in found_values}} - #: Adds cudaKernelNodeAttrID values to output - cudaGraphDebugDotFlagsKernelNodeAttributes = cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsKernelNodeAttributes{{endif}} + cudaGraphDebugDotFlagsKernelNodeAttributes = ( + cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsKernelNodeAttributes, + 'Adds cudaKernelNodeAttrID values to output\n' + ){{endif}} {{if 'cudaGraphDebugDotFlagsHandles' in found_values}} - #: Adds node handles and every kernel function handle to output - cudaGraphDebugDotFlagsHandles = cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsHandles{{endif}} + cudaGraphDebugDotFlagsHandles = ( + cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsHandles, + 'Adds node handles and every kernel function handle to output\n' + ){{endif}} {{if 'cudaGraphDebugDotFlagsConditionalNodeParams' in found_values}} - #: Adds :py:obj:`~.cudaConditionalNodeParams` to output - cudaGraphDebugDotFlagsConditionalNodeParams = cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsConditionalNodeParams{{endif}} + cudaGraphDebugDotFlagsConditionalNodeParams = ( + cyruntime.cudaGraphDebugDotFlags.cudaGraphDebugDotFlagsConditionalNodeParams, + 'Adds :py:obj:`~.cudaConditionalNodeParams` to output\n' + ){{endif}} -_dict_cudaGraphDebugDotFlags = dict(((int(v), v) for k, v in cudaGraphDebugDotFlags.__members__.items())) {{endif}} {{if 'cudaGraphInstantiateFlags' in found_types}} -class cudaGraphInstantiateFlags(IntEnum): +class cudaGraphInstantiateFlags(_FastEnum): """ Flags for instantiating a graph """ {{if 'cudaGraphInstantiateFlagAutoFreeOnLaunch' in found_values}} - #: Automatically free memory allocated in a graph before relaunching. - cudaGraphInstantiateFlagAutoFreeOnLaunch = cyruntime.cudaGraphInstantiateFlags.cudaGraphInstantiateFlagAutoFreeOnLaunch{{endif}} + cudaGraphInstantiateFlagAutoFreeOnLaunch = ( + cyruntime.cudaGraphInstantiateFlags.cudaGraphInstantiateFlagAutoFreeOnLaunch, + 'Automatically free memory allocated in a graph before relaunching.\n' + ){{endif}} {{if 'cudaGraphInstantiateFlagUpload' in found_values}} - #: Automatically upload the graph after instantiation. Only supported - #: by - #: :py:obj:`~.cudaGraphInstantiateWithParams`. The upload will be - #: performed using the - #: stream provided in `instantiateParams`. - cudaGraphInstantiateFlagUpload = cyruntime.cudaGraphInstantiateFlags.cudaGraphInstantiateFlagUpload{{endif}} + cudaGraphInstantiateFlagUpload = ( + cyruntime.cudaGraphInstantiateFlags.cudaGraphInstantiateFlagUpload, + 'Automatically upload the graph after instantiation. Only supported by\n' + ' :py:obj:`~.cudaGraphInstantiateWithParams`. The upload will be performed\n' + 'using the\n' + ' stream provided in `instantiateParams`.\n' + ){{endif}} {{if 'cudaGraphInstantiateFlagDeviceLaunch' in found_values}} - #: Instantiate the graph to be launchable from the device. This flag - #: can only - #: be used on platforms which support unified addressing. This flag - #: cannot be - #: used in conjunction with cudaGraphInstantiateFlagAutoFreeOnLaunch. - cudaGraphInstantiateFlagDeviceLaunch = cyruntime.cudaGraphInstantiateFlags.cudaGraphInstantiateFlagDeviceLaunch{{endif}} + cudaGraphInstantiateFlagDeviceLaunch = ( + cyruntime.cudaGraphInstantiateFlags.cudaGraphInstantiateFlagDeviceLaunch, + 'Instantiate the graph to be launchable from the device. This flag can only\n' + ' be used on platforms which support unified addressing. This flag cannot be\n' + ' used in conjunction with cudaGraphInstantiateFlagAutoFreeOnLaunch.\n' + ){{endif}} {{if 'cudaGraphInstantiateFlagUseNodePriority' in found_values}} - #: Run the graph using the per-node priority attributes rather than the - #: priority of the stream it is launched into. - cudaGraphInstantiateFlagUseNodePriority = cyruntime.cudaGraphInstantiateFlags.cudaGraphInstantiateFlagUseNodePriority{{endif}} + cudaGraphInstantiateFlagUseNodePriority = ( + cyruntime.cudaGraphInstantiateFlags.cudaGraphInstantiateFlagUseNodePriority, + 'Run the graph using the per-node priority attributes rather than the\n' + 'priority of the stream it is launched into.\n' + ){{endif}} -_dict_cudaGraphInstantiateFlags = dict(((int(v), v) for k, v in cudaGraphInstantiateFlags.__members__.items())) {{endif}} {{if 'cudaDeviceNumaConfig' in found_types}} -class cudaDeviceNumaConfig(IntEnum): +class cudaDeviceNumaConfig(_FastEnum): """ CUDA device NUMA config """ {{if 'cudaDeviceNumaConfigNone' in found_values}} - #: The GPU is not a NUMA node - cudaDeviceNumaConfigNone = cyruntime.cudaDeviceNumaConfig.cudaDeviceNumaConfigNone{{endif}} + cudaDeviceNumaConfigNone = ( + cyruntime.cudaDeviceNumaConfig.cudaDeviceNumaConfigNone, + 'The GPU is not a NUMA node\n' + ){{endif}} {{if 'cudaDeviceNumaConfigNumaNode' in found_values}} - #: The GPU is a NUMA node, cudaDevAttrNumaId contains its NUMA ID - cudaDeviceNumaConfigNumaNode = cyruntime.cudaDeviceNumaConfig.cudaDeviceNumaConfigNumaNode{{endif}} + cudaDeviceNumaConfigNumaNode = ( + cyruntime.cudaDeviceNumaConfig.cudaDeviceNumaConfigNumaNode, + 'The GPU is a NUMA node, cudaDevAttrNumaId contains its NUMA ID\n' + ){{endif}} -_dict_cudaDeviceNumaConfig = dict(((int(v), v) for k, v in cudaDeviceNumaConfig.__members__.items())) {{endif}} {{if 'cudaSurfaceBoundaryMode' in found_types}} -class cudaSurfaceBoundaryMode(IntEnum): +class cudaSurfaceBoundaryMode(_FastEnum): """ CUDA Surface boundary modes """ {{if 'cudaBoundaryModeZero' in found_values}} - #: Zero boundary mode - cudaBoundaryModeZero = cyruntime.cudaSurfaceBoundaryMode.cudaBoundaryModeZero{{endif}} + cudaBoundaryModeZero = ( + cyruntime.cudaSurfaceBoundaryMode.cudaBoundaryModeZero, + 'Zero boundary mode\n' + ){{endif}} {{if 'cudaBoundaryModeClamp' in found_values}} - #: Clamp boundary mode - cudaBoundaryModeClamp = cyruntime.cudaSurfaceBoundaryMode.cudaBoundaryModeClamp{{endif}} + cudaBoundaryModeClamp = ( + cyruntime.cudaSurfaceBoundaryMode.cudaBoundaryModeClamp, + 'Clamp boundary mode\n' + ){{endif}} {{if 'cudaBoundaryModeTrap' in found_values}} - #: Trap boundary mode - cudaBoundaryModeTrap = cyruntime.cudaSurfaceBoundaryMode.cudaBoundaryModeTrap{{endif}} + cudaBoundaryModeTrap = ( + cyruntime.cudaSurfaceBoundaryMode.cudaBoundaryModeTrap, + 'Trap boundary mode\n' + ){{endif}} -_dict_cudaSurfaceBoundaryMode = dict(((int(v), v) for k, v in cudaSurfaceBoundaryMode.__members__.items())) {{endif}} {{if 'cudaSurfaceFormatMode' in found_types}} -class cudaSurfaceFormatMode(IntEnum): +class cudaSurfaceFormatMode(_FastEnum): """ CUDA Surface format modes """ {{if 'cudaFormatModeForced' in found_values}} - #: Forced format mode - cudaFormatModeForced = cyruntime.cudaSurfaceFormatMode.cudaFormatModeForced{{endif}} + cudaFormatModeForced = ( + cyruntime.cudaSurfaceFormatMode.cudaFormatModeForced, + 'Forced format mode\n' + ){{endif}} {{if 'cudaFormatModeAuto' in found_values}} - #: Auto format mode - cudaFormatModeAuto = cyruntime.cudaSurfaceFormatMode.cudaFormatModeAuto{{endif}} + cudaFormatModeAuto = ( + cyruntime.cudaSurfaceFormatMode.cudaFormatModeAuto, + 'Auto format mode\n' + ){{endif}} -_dict_cudaSurfaceFormatMode = dict(((int(v), v) for k, v in cudaSurfaceFormatMode.__members__.items())) {{endif}} {{if 'cudaTextureAddressMode' in found_types}} -class cudaTextureAddressMode(IntEnum): +class cudaTextureAddressMode(_FastEnum): """ CUDA texture address modes """ {{if 'cudaAddressModeWrap' in found_values}} - #: Wrapping address mode - cudaAddressModeWrap = cyruntime.cudaTextureAddressMode.cudaAddressModeWrap{{endif}} + cudaAddressModeWrap = ( + cyruntime.cudaTextureAddressMode.cudaAddressModeWrap, + 'Wrapping address mode\n' + ){{endif}} {{if 'cudaAddressModeClamp' in found_values}} - #: Clamp to edge address mode - cudaAddressModeClamp = cyruntime.cudaTextureAddressMode.cudaAddressModeClamp{{endif}} + cudaAddressModeClamp = ( + cyruntime.cudaTextureAddressMode.cudaAddressModeClamp, + 'Clamp to edge address mode\n' + ){{endif}} {{if 'cudaAddressModeMirror' in found_values}} - #: Mirror address mode - cudaAddressModeMirror = cyruntime.cudaTextureAddressMode.cudaAddressModeMirror{{endif}} + cudaAddressModeMirror = ( + cyruntime.cudaTextureAddressMode.cudaAddressModeMirror, + 'Mirror address mode\n' + ){{endif}} {{if 'cudaAddressModeBorder' in found_values}} - #: Border address mode - cudaAddressModeBorder = cyruntime.cudaTextureAddressMode.cudaAddressModeBorder{{endif}} + cudaAddressModeBorder = ( + cyruntime.cudaTextureAddressMode.cudaAddressModeBorder, + 'Border address mode\n' + ){{endif}} -_dict_cudaTextureAddressMode = dict(((int(v), v) for k, v in cudaTextureAddressMode.__members__.items())) {{endif}} {{if 'cudaTextureFilterMode' in found_types}} -class cudaTextureFilterMode(IntEnum): +class cudaTextureFilterMode(_FastEnum): """ CUDA texture filter modes """ {{if 'cudaFilterModePoint' in found_values}} - #: Point filter mode - cudaFilterModePoint = cyruntime.cudaTextureFilterMode.cudaFilterModePoint{{endif}} + cudaFilterModePoint = ( + cyruntime.cudaTextureFilterMode.cudaFilterModePoint, + 'Point filter mode\n' + ){{endif}} {{if 'cudaFilterModeLinear' in found_values}} - #: Linear filter mode - cudaFilterModeLinear = cyruntime.cudaTextureFilterMode.cudaFilterModeLinear{{endif}} + cudaFilterModeLinear = ( + cyruntime.cudaTextureFilterMode.cudaFilterModeLinear, + 'Linear filter mode\n' + ){{endif}} -_dict_cudaTextureFilterMode = dict(((int(v), v) for k, v in cudaTextureFilterMode.__members__.items())) {{endif}} {{if 'cudaTextureReadMode' in found_types}} -class cudaTextureReadMode(IntEnum): +class cudaTextureReadMode(_FastEnum): """ CUDA texture read modes """ {{if 'cudaReadModeElementType' in found_values}} - #: Read texture as specified element type - cudaReadModeElementType = cyruntime.cudaTextureReadMode.cudaReadModeElementType{{endif}} + cudaReadModeElementType = ( + cyruntime.cudaTextureReadMode.cudaReadModeElementType, + 'Read texture as specified element type\n' + ){{endif}} {{if 'cudaReadModeNormalizedFloat' in found_values}} - #: Read texture as normalized float - cudaReadModeNormalizedFloat = cyruntime.cudaTextureReadMode.cudaReadModeNormalizedFloat{{endif}} + cudaReadModeNormalizedFloat = ( + cyruntime.cudaTextureReadMode.cudaReadModeNormalizedFloat, + 'Read texture as normalized float\n' + ){{endif}} -_dict_cudaTextureReadMode = dict(((int(v), v) for k, v in cudaTextureReadMode.__members__.items())) {{endif}} {{if 'cudaRoundMode' in found_types}} -class cudaRoundMode(IntEnum): +class cudaRoundMode(_FastEnum): """""" {{if 'cudaRoundNearest' in found_values}} cudaRoundNearest = cyruntime.cudaRoundMode.cudaRoundNearest{{endif}} @@ -4968,479 +6203,522 @@ class cudaRoundMode(IntEnum): {{if 'cudaRoundMinInf' in found_values}} cudaRoundMinInf = cyruntime.cudaRoundMode.cudaRoundMinInf{{endif}} -_dict_cudaRoundMode = dict(((int(v), v) for k, v in cudaRoundMode.__members__.items())) {{endif}} {{if True}} -class cudaGLDeviceList(IntEnum): +class cudaGLDeviceList(_FastEnum): """ CUDA devices corresponding to the current OpenGL context """ {{if True}} - #: The CUDA devices for all GPUs used by the current OpenGL context - cudaGLDeviceListAll = cyruntime.cudaGLDeviceList.cudaGLDeviceListAll{{endif}} + cudaGLDeviceListAll = ( + cyruntime.cudaGLDeviceList.cudaGLDeviceListAll, + 'The CUDA devices for all GPUs used by the current OpenGL context\n' + ){{endif}} {{if True}} - #: The CUDA devices for the GPUs used by the current OpenGL context in - #: its currently rendering frame - cudaGLDeviceListCurrentFrame = cyruntime.cudaGLDeviceList.cudaGLDeviceListCurrentFrame{{endif}} + cudaGLDeviceListCurrentFrame = ( + cyruntime.cudaGLDeviceList.cudaGLDeviceListCurrentFrame, + 'The CUDA devices for the GPUs used by the current OpenGL context in its\n' + 'currently rendering frame\n' + ){{endif}} {{if True}} - #: The CUDA devices for the GPUs to be used by the current OpenGL - #: context in the next frame - cudaGLDeviceListNextFrame = cyruntime.cudaGLDeviceList.cudaGLDeviceListNextFrame{{endif}} + cudaGLDeviceListNextFrame = ( + cyruntime.cudaGLDeviceList.cudaGLDeviceListNextFrame, + 'The CUDA devices for the GPUs to be used by the current OpenGL context in\n' + 'the next frame\n' + ){{endif}} -_dict_cudaGLDeviceList = dict(((int(v), v) for k, v in cudaGLDeviceList.__members__.items())) {{endif}} {{if True}} -class cudaGLMapFlags(IntEnum): +class cudaGLMapFlags(_FastEnum): """ CUDA GL Map Flags """ {{if True}} - #: Default; Assume resource can be read/written - cudaGLMapFlagsNone = cyruntime.cudaGLMapFlags.cudaGLMapFlagsNone{{endif}} + cudaGLMapFlagsNone = ( + cyruntime.cudaGLMapFlags.cudaGLMapFlagsNone, + 'Default; Assume resource can be read/written\n' + ){{endif}} {{if True}} - #: CUDA kernels will not write to this resource - cudaGLMapFlagsReadOnly = cyruntime.cudaGLMapFlags.cudaGLMapFlagsReadOnly{{endif}} + cudaGLMapFlagsReadOnly = ( + cyruntime.cudaGLMapFlags.cudaGLMapFlagsReadOnly, + 'CUDA kernels will not write to this resource\n' + ){{endif}} {{if True}} - #: CUDA kernels will only write to and will not read from this resource - cudaGLMapFlagsWriteDiscard = cyruntime.cudaGLMapFlags.cudaGLMapFlagsWriteDiscard{{endif}} + cudaGLMapFlagsWriteDiscard = ( + cyruntime.cudaGLMapFlags.cudaGLMapFlagsWriteDiscard, + 'CUDA kernels will only write to and will not read from this resource\n' + ){{endif}} -_dict_cudaGLMapFlags = dict(((int(v), v) for k, v in cudaGLMapFlags.__members__.items())) {{endif}} {{if 'cudaLaunchAttributeID' in found_types}} -class cudaStreamAttrID(IntEnum): +class cudaLaunchAttributeID(_FastEnum): """ Launch attributes enum; used as id field of :py:obj:`~.cudaLaunchAttribute` """ {{if 'cudaLaunchAttributeIgnore' in found_values}} - #: Ignored entry, for convenient composition - cudaLaunchAttributeIgnore = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeIgnore{{endif}} + cudaLaunchAttributeIgnore = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeIgnore, + 'Ignored entry, for convenient composition\n' + ){{endif}} {{if 'cudaLaunchAttributeAccessPolicyWindow' in found_values}} - #: Valid for streams, graph nodes, launches. See - #: :py:obj:`~.cudaLaunchAttributeValue.accessPolicyWindow`. - cudaLaunchAttributeAccessPolicyWindow = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeAccessPolicyWindow{{endif}} + cudaLaunchAttributeAccessPolicyWindow = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeAccessPolicyWindow, + 'Valid for streams, graph nodes, launches. See\n' + ':py:obj:`~.cudaLaunchAttributeValue.accessPolicyWindow`.\n' + ){{endif}} {{if 'cudaLaunchAttributeCooperative' in found_values}} - #: Valid for graph nodes, launches. See - #: :py:obj:`~.cudaLaunchAttributeValue.cooperative`. - cudaLaunchAttributeCooperative = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeCooperative{{endif}} + cudaLaunchAttributeCooperative = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeCooperative, + 'Valid for graph nodes, launches. See\n' + ':py:obj:`~.cudaLaunchAttributeValue.cooperative`.\n' + ){{endif}} {{if 'cudaLaunchAttributeSynchronizationPolicy' in found_values}} - #: Valid for streams. See - #: :py:obj:`~.cudaLaunchAttributeValue.syncPolicy`. - cudaLaunchAttributeSynchronizationPolicy = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeSynchronizationPolicy{{endif}} + cudaLaunchAttributeSynchronizationPolicy = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeSynchronizationPolicy, + 'Valid for streams. See :py:obj:`~.cudaLaunchAttributeValue.syncPolicy`.\n' + ){{endif}} {{if 'cudaLaunchAttributeClusterDimension' in found_values}} - #: Valid for graph nodes, launches. See - #: :py:obj:`~.cudaLaunchAttributeValue.clusterDim`. - cudaLaunchAttributeClusterDimension = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeClusterDimension{{endif}} + cudaLaunchAttributeClusterDimension = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeClusterDimension, + 'Valid for graph nodes, launches. See\n' + ':py:obj:`~.cudaLaunchAttributeValue.clusterDim`.\n' + ){{endif}} {{if 'cudaLaunchAttributeClusterSchedulingPolicyPreference' in found_values}} - #: Valid for graph nodes, launches. See - #: :py:obj:`~.cudaLaunchAttributeValue.clusterSchedulingPolicyPreference`. - cudaLaunchAttributeClusterSchedulingPolicyPreference = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeClusterSchedulingPolicyPreference{{endif}} + cudaLaunchAttributeClusterSchedulingPolicyPreference = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeClusterSchedulingPolicyPreference, + 'Valid for graph nodes, launches. See\n' + ':py:obj:`~.cudaLaunchAttributeValue.clusterSchedulingPolicyPreference`.\n' + ){{endif}} {{if 'cudaLaunchAttributeProgrammaticStreamSerialization' in found_values}} - #: Valid for launches. Setting - #: :py:obj:`~.cudaLaunchAttributeValue.programmaticStreamSerializationAllowed` - #: to non-0 signals that the kernel will use programmatic means to - #: resolve its stream dependency, so that the CUDA runtime should - #: opportunistically allow the grid's execution to overlap with the - #: previous kernel in the stream, if that kernel requests the overlap. - #: The dependent launches can choose to wait on the dependency using - #: the programmatic sync (cudaGridDependencySynchronize() or equivalent - #: PTX instructions). - cudaLaunchAttributeProgrammaticStreamSerialization = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeProgrammaticStreamSerialization{{endif}} + cudaLaunchAttributeProgrammaticStreamSerialization = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeProgrammaticStreamSerialization, + 'Valid for launches. Setting\n' + ':py:obj:`~.cudaLaunchAttributeValue.programmaticStreamSerializationAllowed`\n' + 'to non-0 signals that the kernel will use programmatic means to resolve its\n' + 'stream dependency, so that the CUDA runtime should opportunistically allow\n' + "the grid's execution to overlap with the previous kernel in the stream, if\n" + 'that kernel requests the overlap. The dependent launches can choose to wait\n' + 'on the dependency using the programmatic sync\n' + '(cudaGridDependencySynchronize() or equivalent PTX instructions).\n' + ){{endif}} {{if 'cudaLaunchAttributeProgrammaticEvent' in found_values}} - #: Valid for launches. Set - #: :py:obj:`~.cudaLaunchAttributeValue.programmaticEvent` to record the - #: event. Event recorded through this launch attribute is guaranteed to - #: only trigger after all block in the associated kernel trigger the - #: event. A block can trigger the event programmatically in a future - #: CUDA release. A trigger can also be inserted at the beginning of - #: each block's execution if triggerAtBlockStart is set to non-0. The - #: dependent launches can choose to wait on the dependency using the - #: programmatic sync (cudaGridDependencySynchronize() or equivalent PTX - #: instructions). Note that dependents (including the CPU thread - #: calling :py:obj:`~.cudaEventSynchronize()`) are not guaranteed to - #: observe the release precisely when it is released. For example, - #: :py:obj:`~.cudaEventSynchronize()` may only observe the event - #: trigger long after the associated kernel has completed. This - #: recording type is primarily meant for establishing programmatic - #: dependency between device tasks. Note also this type of dependency - #: allows, but does not guarantee, concurrent execution of tasks. - #: The event supplied must not be an interprocess or interop event. - #: The event must disable timing (i.e. must be created with the - #: :py:obj:`~.cudaEventDisableTiming` flag set). - cudaLaunchAttributeProgrammaticEvent = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeProgrammaticEvent{{endif}} + cudaLaunchAttributeProgrammaticEvent = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeProgrammaticEvent, + 'Valid for launches. Set\n' + ':py:obj:`~.cudaLaunchAttributeValue.programmaticEvent` to record the event.\n' + 'Event recorded through this launch attribute is guaranteed to only trigger\n' + 'after all block in the associated kernel trigger the event. A block can\n' + 'trigger the event programmatically in a future CUDA release. A trigger can\n' + "also be inserted at the beginning of each block's execution if\n" + 'triggerAtBlockStart is set to non-0. The dependent launches can choose to\n' + 'wait on the dependency using the programmatic sync\n' + '(cudaGridDependencySynchronize() or equivalent PTX instructions). Note that\n' + 'dependents (including the CPU thread calling\n' + ':py:obj:`~.cudaEventSynchronize()`) are not guaranteed to observe the\n' + 'release precisely when it is released. For example,\n' + ':py:obj:`~.cudaEventSynchronize()` may only observe the event trigger long\n' + 'after the associated kernel has completed. This recording type is primarily\n' + 'meant for establishing programmatic dependency between device tasks. Note\n' + 'also this type of dependency allows, but does not guarantee, concurrent\n' + 'execution of tasks.\n' + ' The event supplied must not be an interprocess or interop event. The event\n' + 'must disable timing (i.e. must be created with the\n' + ':py:obj:`~.cudaEventDisableTiming` flag set).\n' + ){{endif}} {{if 'cudaLaunchAttributePriority' in found_values}} - #: Valid for streams, graph nodes, launches. See - #: :py:obj:`~.cudaLaunchAttributeValue.priority`. - cudaLaunchAttributePriority = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePriority{{endif}} + cudaLaunchAttributePriority = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePriority, + 'Valid for streams, graph nodes, launches. See\n' + ':py:obj:`~.cudaLaunchAttributeValue.priority`.\n' + ){{endif}} {{if 'cudaLaunchAttributeMemSyncDomainMap' in found_values}} - #: Valid for streams, graph nodes, launches. See - #: :py:obj:`~.cudaLaunchAttributeValue.memSyncDomainMap`. - cudaLaunchAttributeMemSyncDomainMap = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeMemSyncDomainMap{{endif}} + cudaLaunchAttributeMemSyncDomainMap = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeMemSyncDomainMap, + 'Valid for streams, graph nodes, launches. See\n' + ':py:obj:`~.cudaLaunchAttributeValue.memSyncDomainMap`.\n' + ){{endif}} {{if 'cudaLaunchAttributeMemSyncDomain' in found_values}} - #: Valid for streams, graph nodes, launches. See - #: :py:obj:`~.cudaLaunchAttributeValue.memSyncDomain`. - cudaLaunchAttributeMemSyncDomain = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeMemSyncDomain{{endif}} + cudaLaunchAttributeMemSyncDomain = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeMemSyncDomain, + 'Valid for streams, graph nodes, launches. See\n' + ':py:obj:`~.cudaLaunchAttributeValue.memSyncDomain`.\n' + ){{endif}} {{if 'cudaLaunchAttributePreferredClusterDimension' in found_values}} - #: Valid for graph nodes and launches. Set - #: :py:obj:`~.cudaLaunchAttributeValue.preferredClusterDim` to allow - #: the kernel launch to specify a preferred substitute cluster - #: dimension. Blocks may be grouped according to either the dimensions - #: specified with this attribute (grouped into a "preferred substitute - #: cluster"), or the one specified with - #: :py:obj:`~.cudaLaunchAttributeClusterDimension` attribute (grouped - #: into a "regular cluster"). The cluster dimensions of a "preferred - #: substitute cluster" shall be an integer multiple greater than zero - #: of the regular cluster dimensions. The device will attempt - on a - #: best-effort basis - to group thread blocks into preferred clusters - #: over grouping them into regular clusters. When it deems necessary - #: (primarily when the device temporarily runs out of physical - #: resources to launch the larger preferred clusters), the device may - #: switch to launch the regular clusters instead to attempt to utilize - #: as much of the physical device resources as possible. - #: Each type of cluster will have its enumeration / coordinate setup - #: as if the grid consists solely of its type of cluster. For example, - #: if the preferred substitute cluster dimensions double the regular - #: cluster dimensions, there might be simultaneously a regular cluster - #: indexed at (1,0,0), and a preferred cluster indexed at (1,0,0). In - #: this example, the preferred substitute cluster (1,0,0) replaces - #: regular clusters (2,0,0) and (3,0,0) and groups their blocks. - #: This attribute will only take effect when a regular cluster - #: dimension has been specified. The preferred substitute cluster - #: dimension must be an integer multiple greater than zero of the - #: regular cluster dimension and must divide the grid. It must also be - #: no more than `maxBlocksPerCluster`, if it is set in the kernel's - #: `__launch_bounds__`. Otherwise it must be less than the maximum - #: value the driver can support. Otherwise, setting this attribute to a - #: value physically unable to fit on any particular device is - #: permitted. - cudaLaunchAttributePreferredClusterDimension = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePreferredClusterDimension{{endif}} + cudaLaunchAttributePreferredClusterDimension = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePreferredClusterDimension, + 'Valid for graph nodes and launches. Set\n' + ':py:obj:`~.cudaLaunchAttributeValue.preferredClusterDim` to allow the\n' + 'kernel launch to specify a preferred substitute cluster dimension. Blocks\n' + 'may be grouped according to either the dimensions specified with this\n' + 'attribute (grouped into a "preferred substitute cluster"), or the one\n' + 'specified with :py:obj:`~.cudaLaunchAttributeClusterDimension` attribute\n' + '(grouped into a "regular cluster"). The cluster dimensions of a "preferred\n' + 'substitute cluster" shall be an integer multiple greater than zero of the\n' + 'regular cluster dimensions. The device will attempt - on a best-effort\n' + 'basis - to group thread blocks into preferred clusters over grouping them\n' + 'into regular clusters. When it deems necessary (primarily when the device\n' + 'temporarily runs out of physical resources to launch the larger preferred\n' + 'clusters), the device may switch to launch the regular clusters instead to\n' + 'attempt to utilize as much of the physical device resources as possible.\n' + ' Each type of cluster will have its enumeration / coordinate setup as if\n' + 'the grid consists solely of its type of cluster. For example, if the\n' + 'preferred substitute cluster dimensions double the regular cluster\n' + 'dimensions, there might be simultaneously a regular cluster indexed at\n' + '(1,0,0), and a preferred cluster indexed at (1,0,0). In this example, the\n' + 'preferred substitute cluster (1,0,0) replaces regular clusters (2,0,0) and\n' + '(3,0,0) and groups their blocks.\n' + ' This attribute will only take effect when a regular cluster dimension has\n' + 'been specified. The preferred substitute cluster dimension must be an\n' + 'integer multiple greater than zero of the regular cluster dimension and\n' + 'must divide the grid. It must also be no more than `maxBlocksPerCluster`,\n' + "if it is set in the kernel's `__launch_bounds__`. Otherwise it must be less\n" + 'than the maximum value the driver can support. Otherwise, setting this\n' + 'attribute to a value physically unable to fit on any particular device is\n' + 'permitted.\n' + ){{endif}} {{if 'cudaLaunchAttributeLaunchCompletionEvent' in found_values}} - #: Valid for launches. Set - #: :py:obj:`~.cudaLaunchAttributeValue.launchCompletionEvent` to record - #: the event. - #: Nominally, the event is triggered once all blocks of the kernel - #: have begun execution. Currently this is a best effort. If a kernel B - #: has a launch completion dependency on a kernel A, B may wait until A - #: is complete. Alternatively, blocks of B may begin before all blocks - #: of A have begun, for example if B can claim execution resources - #: unavailable to A (e.g. they run on different GPUs) or if B is a - #: higher priority than A. Exercise caution if such an ordering - #: inversion could lead to deadlock. - #: A launch completion event is nominally similar to a programmatic - #: event with `triggerAtBlockStart` set except that it is not visible - #: to `cudaGridDependencySynchronize()` and can be used with compute - #: capability less than 9.0. - #: The event supplied must not be an interprocess or interop event. - #: The event must disable timing (i.e. must be created with the - #: :py:obj:`~.cudaEventDisableTiming` flag set). - cudaLaunchAttributeLaunchCompletionEvent = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeLaunchCompletionEvent{{endif}} + cudaLaunchAttributeLaunchCompletionEvent = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeLaunchCompletionEvent, + 'Valid for launches. Set\n' + ':py:obj:`~.cudaLaunchAttributeValue.launchCompletionEvent` to record the\n' + 'event.\n' + ' Nominally, the event is triggered once all blocks of the kernel have begun\n' + 'execution. Currently this is a best effort. If a kernel B has a launch\n' + 'completion dependency on a kernel A, B may wait until A is complete.\n' + 'Alternatively, blocks of B may begin before all blocks of A have begun, for\n' + 'example if B can claim execution resources unavailable to A (e.g. they run\n' + 'on different GPUs) or if B is a higher priority than A. Exercise caution if\n' + 'such an ordering inversion could lead to deadlock.\n' + ' A launch completion event is nominally similar to a programmatic event\n' + 'with `triggerAtBlockStart` set except that it is not visible to\n' + '`cudaGridDependencySynchronize()` and can be used with compute capability\n' + 'less than 9.0.\n' + ' The event supplied must not be an interprocess or interop event. The event\n' + 'must disable timing (i.e. must be created with the\n' + ':py:obj:`~.cudaEventDisableTiming` flag set).\n' + ){{endif}} {{if 'cudaLaunchAttributeDeviceUpdatableKernelNode' in found_values}} - #: Valid for graph nodes, launches. This attribute is graphs-only, and - #: passing it to a launch in a non-capturing stream will result in an - #: error. - #: :cudaLaunchAttributeValue::deviceUpdatableKernelNode::deviceUpdatable - #: can only be set to 0 or 1. Setting the field to 1 indicates that the - #: corresponding kernel node should be device-updatable. On success, a - #: handle will be returned via - #: :py:obj:`~.cudaLaunchAttributeValue`::deviceUpdatableKernelNode::devNode - #: which can be passed to the various device-side update functions to - #: update the node's kernel parameters from within another kernel. For - #: more information on the types of device updates that can be made, as - #: well as the relevant limitations thereof, see - #: :py:obj:`~.cudaGraphKernelNodeUpdatesApply`. - #: Nodes which are device-updatable have additional restrictions - #: compared to regular kernel nodes. Firstly, device-updatable nodes - #: cannot be removed from their graph via - #: :py:obj:`~.cudaGraphDestroyNode`. Additionally, once opted-in to - #: this functionality, a node cannot opt out, and any attempt to set - #: the deviceUpdatable attribute to 0 will result in an error. Device- - #: updatable kernel nodes also cannot have their attributes copied - #: to/from another kernel node via - #: :py:obj:`~.cudaGraphKernelNodeCopyAttributes`. Graphs containing one - #: or more device-updatable nodes also do not allow multiple - #: instantiation, and neither the graph nor its instantiated version - #: can be passed to :py:obj:`~.cudaGraphExecUpdate`. - #: If a graph contains device-updatable nodes and updates those nodes - #: from the device from within the graph, the graph must be uploaded - #: with :py:obj:`~.cuGraphUpload` before it is launched. For such a - #: graph, if host-side executable graph updates are made to the device- - #: updatable nodes, the graph must be uploaded before it is launched - #: again. - cudaLaunchAttributeDeviceUpdatableKernelNode = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeDeviceUpdatableKernelNode{{endif}} + cudaLaunchAttributeDeviceUpdatableKernelNode = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeDeviceUpdatableKernelNode, + 'Valid for graph nodes, launches. This attribute is graphs-only, and passing\n' + 'it to a launch in a non-capturing stream will result in an error.\n' + ' :cudaLaunchAttributeValue::deviceUpdatableKernelNode::deviceUpdatable can\n' + 'only be set to 0 or 1. Setting the field to 1 indicates that the\n' + 'corresponding kernel node should be device-updatable. On success, a handle\n' + 'will be returned via\n' + ':py:obj:`~.cudaLaunchAttributeValue`::deviceUpdatableKernelNode::devNode\n' + 'which can be passed to the various device-side update functions to update\n' + "the node's kernel parameters from within another kernel. For more\n" + 'information on the types of device updates that can be made, as well as the\n' + 'relevant limitations thereof, see\n' + ':py:obj:`~.cudaGraphKernelNodeUpdatesApply`.\n' + ' Nodes which are device-updatable have additional restrictions compared to\n' + 'regular kernel nodes. Firstly, device-updatable nodes cannot be removed\n' + 'from their graph via :py:obj:`~.cudaGraphDestroyNode`. Additionally, once\n' + 'opted-in to this functionality, a node cannot opt out, and any attempt to\n' + 'set the deviceUpdatable attribute to 0 will result in an error. Device-\n' + 'updatable kernel nodes also cannot have their attributes copied to/from\n' + 'another kernel node via :py:obj:`~.cudaGraphKernelNodeCopyAttributes`.\n' + 'Graphs containing one or more device-updatable nodes also do not allow\n' + 'multiple instantiation, and neither the graph nor its instantiated version\n' + 'can be passed to :py:obj:`~.cudaGraphExecUpdate`.\n' + ' If a graph contains device-updatable nodes and updates those nodes from\n' + 'the device from within the graph, the graph must be uploaded with\n' + ':py:obj:`~.cuGraphUpload` before it is launched. For such a graph, if host-\n' + 'side executable graph updates are made to the device-updatable nodes, the\n' + 'graph must be uploaded before it is launched again.\n' + ){{endif}} {{if 'cudaLaunchAttributePreferredSharedMemoryCarveout' in found_values}} - #: Valid for launches. On devices where the L1 cache and shared memory - #: use the same hardware resources, setting - #: :py:obj:`~.cudaLaunchAttributeValue.sharedMemCarveout` to a - #: percentage between 0-100 signals sets the shared memory carveout - #: preference in percent of the total shared memory for that kernel - #: launch. This attribute takes precedence over - #: :py:obj:`~.cudaFuncAttributePreferredSharedMemoryCarveout`. This is - #: only a hint, and the driver can choose a different configuration if - #: required for the launch. - cudaLaunchAttributePreferredSharedMemoryCarveout = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePreferredSharedMemoryCarveout{{endif}} + cudaLaunchAttributePreferredSharedMemoryCarveout = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePreferredSharedMemoryCarveout, + 'Valid for launches. On devices where the L1 cache and shared memory use the\n' + 'same hardware resources, setting\n' + ':py:obj:`~.cudaLaunchAttributeValue.sharedMemCarveout` to a percentage\n' + 'between 0-100 signals sets the shared memory carveout preference in percent\n' + 'of the total shared memory for that kernel launch. This attribute takes\n' + 'precedence over :py:obj:`~.cudaFuncAttributePreferredSharedMemoryCarveout`.\n' + 'This is only a hint, and the driver can choose a different configuration if\n' + 'required for the launch.\n' + ){{endif}} {{if 'cudaLaunchAttributeNvlinkUtilCentricScheduling' in found_values}} - #: Valid for streams, graph nodes, launches. This attribute is a hint - #: to the CUDA runtime that the launch should attempt to make the - #: kernel maximize its NVLINK utilization. - #: - #: When possible to honor this hint, CUDA will assume each block in - #: the grid launch will carry out an even amount of NVLINK traffic, and - #: make a best-effort attempt to adjust the kernel launch based on that - #: assumption. - #: This attribute is a hint only. CUDA makes no functional or - #: performance guarantee. Its applicability can be affected by many - #: different factors, including driver version (i.e. CUDA doesn't - #: guarantee the performance characteristics will be maintained between - #: driver versions or a driver update could alter or regress previously - #: observed perf characteristics.) It also doesn't guarantee a - #: successful result, i.e. applying the attribute may not improve the - #: performance of either the targeted kernel or the encapsulating - #: application. - #: Valid values for - #: :py:obj:`~.cudaLaunchAttributeValue.nvlinkUtilCentricScheduling` are - #: 0 (disabled) and 1 (enabled). - cudaLaunchAttributeNvlinkUtilCentricScheduling = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeNvlinkUtilCentricScheduling{{endif}} - -_dict_cudaLaunchAttributeID = dict(((int(v), v) for k, v in cudaLaunchAttributeID.__members__.items())) + cudaLaunchAttributeNvlinkUtilCentricScheduling = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeNvlinkUtilCentricScheduling, + 'Valid for streams, graph nodes, launches. This attribute is a hint to the\n' + 'CUDA runtime that the launch should attempt to make the kernel maximize its\n' + 'NVLINK utilization.\n' + ' When possible to honor this hint, CUDA will assume each block in the grid\n' + 'launch will carry out an even amount of NVLINK traffic, and make a best-\n' + 'effort attempt to adjust the kernel launch based on that assumption.\n' + ' This attribute is a hint only. CUDA makes no functional or performance\n' + 'guarantee. Its applicability can be affected by many different factors,\n' + "including driver version (i.e. CUDA doesn't guarantee the performance\n" + 'characteristics will be maintained between driver versions or a driver\n' + 'update could alter or regress previously observed perf characteristics.) It\n' + "also doesn't guarantee a successful result, i.e. applying the attribute may\n" + 'not improve the performance of either the targeted kernel or the\n' + 'encapsulating application.\n' + ' Valid values for\n' + ':py:obj:`~.cudaLaunchAttributeValue.nvlinkUtilCentricScheduling` are 0\n' + '(disabled) and 1 (enabled).\n' + ){{endif}} + {{endif}} {{if 'cudaLaunchAttributeID' in found_types}} -class cudaKernelNodeAttrID(IntEnum): +class cudaLaunchAttributeID(_FastEnum): """ Launch attributes enum; used as id field of :py:obj:`~.cudaLaunchAttribute` """ {{if 'cudaLaunchAttributeIgnore' in found_values}} - #: Ignored entry, for convenient composition - cudaLaunchAttributeIgnore = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeIgnore{{endif}} + cudaLaunchAttributeIgnore = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeIgnore, + 'Ignored entry, for convenient composition\n' + ){{endif}} {{if 'cudaLaunchAttributeAccessPolicyWindow' in found_values}} - #: Valid for streams, graph nodes, launches. See - #: :py:obj:`~.cudaLaunchAttributeValue.accessPolicyWindow`. - cudaLaunchAttributeAccessPolicyWindow = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeAccessPolicyWindow{{endif}} + cudaLaunchAttributeAccessPolicyWindow = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeAccessPolicyWindow, + 'Valid for streams, graph nodes, launches. See\n' + ':py:obj:`~.cudaLaunchAttributeValue.accessPolicyWindow`.\n' + ){{endif}} {{if 'cudaLaunchAttributeCooperative' in found_values}} - #: Valid for graph nodes, launches. See - #: :py:obj:`~.cudaLaunchAttributeValue.cooperative`. - cudaLaunchAttributeCooperative = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeCooperative{{endif}} + cudaLaunchAttributeCooperative = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeCooperative, + 'Valid for graph nodes, launches. See\n' + ':py:obj:`~.cudaLaunchAttributeValue.cooperative`.\n' + ){{endif}} {{if 'cudaLaunchAttributeSynchronizationPolicy' in found_values}} - #: Valid for streams. See - #: :py:obj:`~.cudaLaunchAttributeValue.syncPolicy`. - cudaLaunchAttributeSynchronizationPolicy = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeSynchronizationPolicy{{endif}} + cudaLaunchAttributeSynchronizationPolicy = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeSynchronizationPolicy, + 'Valid for streams. See :py:obj:`~.cudaLaunchAttributeValue.syncPolicy`.\n' + ){{endif}} {{if 'cudaLaunchAttributeClusterDimension' in found_values}} - #: Valid for graph nodes, launches. See - #: :py:obj:`~.cudaLaunchAttributeValue.clusterDim`. - cudaLaunchAttributeClusterDimension = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeClusterDimension{{endif}} + cudaLaunchAttributeClusterDimension = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeClusterDimension, + 'Valid for graph nodes, launches. See\n' + ':py:obj:`~.cudaLaunchAttributeValue.clusterDim`.\n' + ){{endif}} {{if 'cudaLaunchAttributeClusterSchedulingPolicyPreference' in found_values}} - #: Valid for graph nodes, launches. See - #: :py:obj:`~.cudaLaunchAttributeValue.clusterSchedulingPolicyPreference`. - cudaLaunchAttributeClusterSchedulingPolicyPreference = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeClusterSchedulingPolicyPreference{{endif}} + cudaLaunchAttributeClusterSchedulingPolicyPreference = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeClusterSchedulingPolicyPreference, + 'Valid for graph nodes, launches. See\n' + ':py:obj:`~.cudaLaunchAttributeValue.clusterSchedulingPolicyPreference`.\n' + ){{endif}} {{if 'cudaLaunchAttributeProgrammaticStreamSerialization' in found_values}} - #: Valid for launches. Setting - #: :py:obj:`~.cudaLaunchAttributeValue.programmaticStreamSerializationAllowed` - #: to non-0 signals that the kernel will use programmatic means to - #: resolve its stream dependency, so that the CUDA runtime should - #: opportunistically allow the grid's execution to overlap with the - #: previous kernel in the stream, if that kernel requests the overlap. - #: The dependent launches can choose to wait on the dependency using - #: the programmatic sync (cudaGridDependencySynchronize() or equivalent - #: PTX instructions). - cudaLaunchAttributeProgrammaticStreamSerialization = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeProgrammaticStreamSerialization{{endif}} + cudaLaunchAttributeProgrammaticStreamSerialization = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeProgrammaticStreamSerialization, + 'Valid for launches. Setting\n' + ':py:obj:`~.cudaLaunchAttributeValue.programmaticStreamSerializationAllowed`\n' + 'to non-0 signals that the kernel will use programmatic means to resolve its\n' + 'stream dependency, so that the CUDA runtime should opportunistically allow\n' + "the grid's execution to overlap with the previous kernel in the stream, if\n" + 'that kernel requests the overlap. The dependent launches can choose to wait\n' + 'on the dependency using the programmatic sync\n' + '(cudaGridDependencySynchronize() or equivalent PTX instructions).\n' + ){{endif}} {{if 'cudaLaunchAttributeProgrammaticEvent' in found_values}} - #: Valid for launches. Set - #: :py:obj:`~.cudaLaunchAttributeValue.programmaticEvent` to record the - #: event. Event recorded through this launch attribute is guaranteed to - #: only trigger after all block in the associated kernel trigger the - #: event. A block can trigger the event programmatically in a future - #: CUDA release. A trigger can also be inserted at the beginning of - #: each block's execution if triggerAtBlockStart is set to non-0. The - #: dependent launches can choose to wait on the dependency using the - #: programmatic sync (cudaGridDependencySynchronize() or equivalent PTX - #: instructions). Note that dependents (including the CPU thread - #: calling :py:obj:`~.cudaEventSynchronize()`) are not guaranteed to - #: observe the release precisely when it is released. For example, - #: :py:obj:`~.cudaEventSynchronize()` may only observe the event - #: trigger long after the associated kernel has completed. This - #: recording type is primarily meant for establishing programmatic - #: dependency between device tasks. Note also this type of dependency - #: allows, but does not guarantee, concurrent execution of tasks. - #: The event supplied must not be an interprocess or interop event. - #: The event must disable timing (i.e. must be created with the - #: :py:obj:`~.cudaEventDisableTiming` flag set). - cudaLaunchAttributeProgrammaticEvent = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeProgrammaticEvent{{endif}} + cudaLaunchAttributeProgrammaticEvent = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeProgrammaticEvent, + 'Valid for launches. Set\n' + ':py:obj:`~.cudaLaunchAttributeValue.programmaticEvent` to record the event.\n' + 'Event recorded through this launch attribute is guaranteed to only trigger\n' + 'after all block in the associated kernel trigger the event. A block can\n' + 'trigger the event programmatically in a future CUDA release. A trigger can\n' + "also be inserted at the beginning of each block's execution if\n" + 'triggerAtBlockStart is set to non-0. The dependent launches can choose to\n' + 'wait on the dependency using the programmatic sync\n' + '(cudaGridDependencySynchronize() or equivalent PTX instructions). Note that\n' + 'dependents (including the CPU thread calling\n' + ':py:obj:`~.cudaEventSynchronize()`) are not guaranteed to observe the\n' + 'release precisely when it is released. For example,\n' + ':py:obj:`~.cudaEventSynchronize()` may only observe the event trigger long\n' + 'after the associated kernel has completed. This recording type is primarily\n' + 'meant for establishing programmatic dependency between device tasks. Note\n' + 'also this type of dependency allows, but does not guarantee, concurrent\n' + 'execution of tasks.\n' + ' The event supplied must not be an interprocess or interop event. The event\n' + 'must disable timing (i.e. must be created with the\n' + ':py:obj:`~.cudaEventDisableTiming` flag set).\n' + ){{endif}} {{if 'cudaLaunchAttributePriority' in found_values}} - #: Valid for streams, graph nodes, launches. See - #: :py:obj:`~.cudaLaunchAttributeValue.priority`. - cudaLaunchAttributePriority = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePriority{{endif}} + cudaLaunchAttributePriority = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePriority, + 'Valid for streams, graph nodes, launches. See\n' + ':py:obj:`~.cudaLaunchAttributeValue.priority`.\n' + ){{endif}} {{if 'cudaLaunchAttributeMemSyncDomainMap' in found_values}} - #: Valid for streams, graph nodes, launches. See - #: :py:obj:`~.cudaLaunchAttributeValue.memSyncDomainMap`. - cudaLaunchAttributeMemSyncDomainMap = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeMemSyncDomainMap{{endif}} + cudaLaunchAttributeMemSyncDomainMap = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeMemSyncDomainMap, + 'Valid for streams, graph nodes, launches. See\n' + ':py:obj:`~.cudaLaunchAttributeValue.memSyncDomainMap`.\n' + ){{endif}} {{if 'cudaLaunchAttributeMemSyncDomain' in found_values}} - #: Valid for streams, graph nodes, launches. See - #: :py:obj:`~.cudaLaunchAttributeValue.memSyncDomain`. - cudaLaunchAttributeMemSyncDomain = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeMemSyncDomain{{endif}} + cudaLaunchAttributeMemSyncDomain = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeMemSyncDomain, + 'Valid for streams, graph nodes, launches. See\n' + ':py:obj:`~.cudaLaunchAttributeValue.memSyncDomain`.\n' + ){{endif}} {{if 'cudaLaunchAttributePreferredClusterDimension' in found_values}} - #: Valid for graph nodes and launches. Set - #: :py:obj:`~.cudaLaunchAttributeValue.preferredClusterDim` to allow - #: the kernel launch to specify a preferred substitute cluster - #: dimension. Blocks may be grouped according to either the dimensions - #: specified with this attribute (grouped into a "preferred substitute - #: cluster"), or the one specified with - #: :py:obj:`~.cudaLaunchAttributeClusterDimension` attribute (grouped - #: into a "regular cluster"). The cluster dimensions of a "preferred - #: substitute cluster" shall be an integer multiple greater than zero - #: of the regular cluster dimensions. The device will attempt - on a - #: best-effort basis - to group thread blocks into preferred clusters - #: over grouping them into regular clusters. When it deems necessary - #: (primarily when the device temporarily runs out of physical - #: resources to launch the larger preferred clusters), the device may - #: switch to launch the regular clusters instead to attempt to utilize - #: as much of the physical device resources as possible. - #: Each type of cluster will have its enumeration / coordinate setup - #: as if the grid consists solely of its type of cluster. For example, - #: if the preferred substitute cluster dimensions double the regular - #: cluster dimensions, there might be simultaneously a regular cluster - #: indexed at (1,0,0), and a preferred cluster indexed at (1,0,0). In - #: this example, the preferred substitute cluster (1,0,0) replaces - #: regular clusters (2,0,0) and (3,0,0) and groups their blocks. - #: This attribute will only take effect when a regular cluster - #: dimension has been specified. The preferred substitute cluster - #: dimension must be an integer multiple greater than zero of the - #: regular cluster dimension and must divide the grid. It must also be - #: no more than `maxBlocksPerCluster`, if it is set in the kernel's - #: `__launch_bounds__`. Otherwise it must be less than the maximum - #: value the driver can support. Otherwise, setting this attribute to a - #: value physically unable to fit on any particular device is - #: permitted. - cudaLaunchAttributePreferredClusterDimension = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePreferredClusterDimension{{endif}} + cudaLaunchAttributePreferredClusterDimension = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePreferredClusterDimension, + 'Valid for graph nodes and launches. Set\n' + ':py:obj:`~.cudaLaunchAttributeValue.preferredClusterDim` to allow the\n' + 'kernel launch to specify a preferred substitute cluster dimension. Blocks\n' + 'may be grouped according to either the dimensions specified with this\n' + 'attribute (grouped into a "preferred substitute cluster"), or the one\n' + 'specified with :py:obj:`~.cudaLaunchAttributeClusterDimension` attribute\n' + '(grouped into a "regular cluster"). The cluster dimensions of a "preferred\n' + 'substitute cluster" shall be an integer multiple greater than zero of the\n' + 'regular cluster dimensions. The device will attempt - on a best-effort\n' + 'basis - to group thread blocks into preferred clusters over grouping them\n' + 'into regular clusters. When it deems necessary (primarily when the device\n' + 'temporarily runs out of physical resources to launch the larger preferred\n' + 'clusters), the device may switch to launch the regular clusters instead to\n' + 'attempt to utilize as much of the physical device resources as possible.\n' + ' Each type of cluster will have its enumeration / coordinate setup as if\n' + 'the grid consists solely of its type of cluster. For example, if the\n' + 'preferred substitute cluster dimensions double the regular cluster\n' + 'dimensions, there might be simultaneously a regular cluster indexed at\n' + '(1,0,0), and a preferred cluster indexed at (1,0,0). In this example, the\n' + 'preferred substitute cluster (1,0,0) replaces regular clusters (2,0,0) and\n' + '(3,0,0) and groups their blocks.\n' + ' This attribute will only take effect when a regular cluster dimension has\n' + 'been specified. The preferred substitute cluster dimension must be an\n' + 'integer multiple greater than zero of the regular cluster dimension and\n' + 'must divide the grid. It must also be no more than `maxBlocksPerCluster`,\n' + "if it is set in the kernel's `__launch_bounds__`. Otherwise it must be less\n" + 'than the maximum value the driver can support. Otherwise, setting this\n' + 'attribute to a value physically unable to fit on any particular device is\n' + 'permitted.\n' + ){{endif}} {{if 'cudaLaunchAttributeLaunchCompletionEvent' in found_values}} - #: Valid for launches. Set - #: :py:obj:`~.cudaLaunchAttributeValue.launchCompletionEvent` to record - #: the event. - #: Nominally, the event is triggered once all blocks of the kernel - #: have begun execution. Currently this is a best effort. If a kernel B - #: has a launch completion dependency on a kernel A, B may wait until A - #: is complete. Alternatively, blocks of B may begin before all blocks - #: of A have begun, for example if B can claim execution resources - #: unavailable to A (e.g. they run on different GPUs) or if B is a - #: higher priority than A. Exercise caution if such an ordering - #: inversion could lead to deadlock. - #: A launch completion event is nominally similar to a programmatic - #: event with `triggerAtBlockStart` set except that it is not visible - #: to `cudaGridDependencySynchronize()` and can be used with compute - #: capability less than 9.0. - #: The event supplied must not be an interprocess or interop event. - #: The event must disable timing (i.e. must be created with the - #: :py:obj:`~.cudaEventDisableTiming` flag set). - cudaLaunchAttributeLaunchCompletionEvent = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeLaunchCompletionEvent{{endif}} + cudaLaunchAttributeLaunchCompletionEvent = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeLaunchCompletionEvent, + 'Valid for launches. Set\n' + ':py:obj:`~.cudaLaunchAttributeValue.launchCompletionEvent` to record the\n' + 'event.\n' + ' Nominally, the event is triggered once all blocks of the kernel have begun\n' + 'execution. Currently this is a best effort. If a kernel B has a launch\n' + 'completion dependency on a kernel A, B may wait until A is complete.\n' + 'Alternatively, blocks of B may begin before all blocks of A have begun, for\n' + 'example if B can claim execution resources unavailable to A (e.g. they run\n' + 'on different GPUs) or if B is a higher priority than A. Exercise caution if\n' + 'such an ordering inversion could lead to deadlock.\n' + ' A launch completion event is nominally similar to a programmatic event\n' + 'with `triggerAtBlockStart` set except that it is not visible to\n' + '`cudaGridDependencySynchronize()` and can be used with compute capability\n' + 'less than 9.0.\n' + ' The event supplied must not be an interprocess or interop event. The event\n' + 'must disable timing (i.e. must be created with the\n' + ':py:obj:`~.cudaEventDisableTiming` flag set).\n' + ){{endif}} {{if 'cudaLaunchAttributeDeviceUpdatableKernelNode' in found_values}} - #: Valid for graph nodes, launches. This attribute is graphs-only, and - #: passing it to a launch in a non-capturing stream will result in an - #: error. - #: :cudaLaunchAttributeValue::deviceUpdatableKernelNode::deviceUpdatable - #: can only be set to 0 or 1. Setting the field to 1 indicates that the - #: corresponding kernel node should be device-updatable. On success, a - #: handle will be returned via - #: :py:obj:`~.cudaLaunchAttributeValue`::deviceUpdatableKernelNode::devNode - #: which can be passed to the various device-side update functions to - #: update the node's kernel parameters from within another kernel. For - #: more information on the types of device updates that can be made, as - #: well as the relevant limitations thereof, see - #: :py:obj:`~.cudaGraphKernelNodeUpdatesApply`. - #: Nodes which are device-updatable have additional restrictions - #: compared to regular kernel nodes. Firstly, device-updatable nodes - #: cannot be removed from their graph via - #: :py:obj:`~.cudaGraphDestroyNode`. Additionally, once opted-in to - #: this functionality, a node cannot opt out, and any attempt to set - #: the deviceUpdatable attribute to 0 will result in an error. Device- - #: updatable kernel nodes also cannot have their attributes copied - #: to/from another kernel node via - #: :py:obj:`~.cudaGraphKernelNodeCopyAttributes`. Graphs containing one - #: or more device-updatable nodes also do not allow multiple - #: instantiation, and neither the graph nor its instantiated version - #: can be passed to :py:obj:`~.cudaGraphExecUpdate`. - #: If a graph contains device-updatable nodes and updates those nodes - #: from the device from within the graph, the graph must be uploaded - #: with :py:obj:`~.cuGraphUpload` before it is launched. For such a - #: graph, if host-side executable graph updates are made to the device- - #: updatable nodes, the graph must be uploaded before it is launched - #: again. - cudaLaunchAttributeDeviceUpdatableKernelNode = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeDeviceUpdatableKernelNode{{endif}} + cudaLaunchAttributeDeviceUpdatableKernelNode = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeDeviceUpdatableKernelNode, + 'Valid for graph nodes, launches. This attribute is graphs-only, and passing\n' + 'it to a launch in a non-capturing stream will result in an error.\n' + ' :cudaLaunchAttributeValue::deviceUpdatableKernelNode::deviceUpdatable can\n' + 'only be set to 0 or 1. Setting the field to 1 indicates that the\n' + 'corresponding kernel node should be device-updatable. On success, a handle\n' + 'will be returned via\n' + ':py:obj:`~.cudaLaunchAttributeValue`::deviceUpdatableKernelNode::devNode\n' + 'which can be passed to the various device-side update functions to update\n' + "the node's kernel parameters from within another kernel. For more\n" + 'information on the types of device updates that can be made, as well as the\n' + 'relevant limitations thereof, see\n' + ':py:obj:`~.cudaGraphKernelNodeUpdatesApply`.\n' + ' Nodes which are device-updatable have additional restrictions compared to\n' + 'regular kernel nodes. Firstly, device-updatable nodes cannot be removed\n' + 'from their graph via :py:obj:`~.cudaGraphDestroyNode`. Additionally, once\n' + 'opted-in to this functionality, a node cannot opt out, and any attempt to\n' + 'set the deviceUpdatable attribute to 0 will result in an error. Device-\n' + 'updatable kernel nodes also cannot have their attributes copied to/from\n' + 'another kernel node via :py:obj:`~.cudaGraphKernelNodeCopyAttributes`.\n' + 'Graphs containing one or more device-updatable nodes also do not allow\n' + 'multiple instantiation, and neither the graph nor its instantiated version\n' + 'can be passed to :py:obj:`~.cudaGraphExecUpdate`.\n' + ' If a graph contains device-updatable nodes and updates those nodes from\n' + 'the device from within the graph, the graph must be uploaded with\n' + ':py:obj:`~.cuGraphUpload` before it is launched. For such a graph, if host-\n' + 'side executable graph updates are made to the device-updatable nodes, the\n' + 'graph must be uploaded before it is launched again.\n' + ){{endif}} {{if 'cudaLaunchAttributePreferredSharedMemoryCarveout' in found_values}} - #: Valid for launches. On devices where the L1 cache and shared memory - #: use the same hardware resources, setting - #: :py:obj:`~.cudaLaunchAttributeValue.sharedMemCarveout` to a - #: percentage between 0-100 signals sets the shared memory carveout - #: preference in percent of the total shared memory for that kernel - #: launch. This attribute takes precedence over - #: :py:obj:`~.cudaFuncAttributePreferredSharedMemoryCarveout`. This is - #: only a hint, and the driver can choose a different configuration if - #: required for the launch. - cudaLaunchAttributePreferredSharedMemoryCarveout = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePreferredSharedMemoryCarveout{{endif}} + cudaLaunchAttributePreferredSharedMemoryCarveout = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePreferredSharedMemoryCarveout, + 'Valid for launches. On devices where the L1 cache and shared memory use the\n' + 'same hardware resources, setting\n' + ':py:obj:`~.cudaLaunchAttributeValue.sharedMemCarveout` to a percentage\n' + 'between 0-100 signals sets the shared memory carveout preference in percent\n' + 'of the total shared memory for that kernel launch. This attribute takes\n' + 'precedence over :py:obj:`~.cudaFuncAttributePreferredSharedMemoryCarveout`.\n' + 'This is only a hint, and the driver can choose a different configuration if\n' + 'required for the launch.\n' + ){{endif}} {{if 'cudaLaunchAttributeNvlinkUtilCentricScheduling' in found_values}} - #: Valid for streams, graph nodes, launches. This attribute is a hint - #: to the CUDA runtime that the launch should attempt to make the - #: kernel maximize its NVLINK utilization. - #: - #: When possible to honor this hint, CUDA will assume each block in - #: the grid launch will carry out an even amount of NVLINK traffic, and - #: make a best-effort attempt to adjust the kernel launch based on that - #: assumption. - #: This attribute is a hint only. CUDA makes no functional or - #: performance guarantee. Its applicability can be affected by many - #: different factors, including driver version (i.e. CUDA doesn't - #: guarantee the performance characteristics will be maintained between - #: driver versions or a driver update could alter or regress previously - #: observed perf characteristics.) It also doesn't guarantee a - #: successful result, i.e. applying the attribute may not improve the - #: performance of either the targeted kernel or the encapsulating - #: application. - #: Valid values for - #: :py:obj:`~.cudaLaunchAttributeValue.nvlinkUtilCentricScheduling` are - #: 0 (disabled) and 1 (enabled). - cudaLaunchAttributeNvlinkUtilCentricScheduling = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeNvlinkUtilCentricScheduling{{endif}} - -_dict_cudaLaunchAttributeID = dict(((int(v), v) for k, v in cudaLaunchAttributeID.__members__.items())) + cudaLaunchAttributeNvlinkUtilCentricScheduling = ( + cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeNvlinkUtilCentricScheduling, + 'Valid for streams, graph nodes, launches. This attribute is a hint to the\n' + 'CUDA runtime that the launch should attempt to make the kernel maximize its\n' + 'NVLINK utilization.\n' + ' When possible to honor this hint, CUDA will assume each block in the grid\n' + 'launch will carry out an even amount of NVLINK traffic, and make a best-\n' + 'effort attempt to adjust the kernel launch based on that assumption.\n' + ' This attribute is a hint only. CUDA makes no functional or performance\n' + 'guarantee. Its applicability can be affected by many different factors,\n' + "including driver version (i.e. CUDA doesn't guarantee the performance\n" + 'characteristics will be maintained between driver versions or a driver\n' + 'update could alter or regress previously observed perf characteristics.) It\n' + "also doesn't guarantee a successful result, i.e. applying the attribute may\n" + 'not improve the performance of either the targeted kernel or the\n' + 'encapsulating application.\n' + ' Valid values for\n' + ':py:obj:`~.cudaLaunchAttributeValue.nvlinkUtilCentricScheduling` are 0\n' + '(disabled) and 1 (enabled).\n' + ){{endif}} + {{endif}} {{if 'cudaDevResourceDesc_t' in found_types}} @@ -6379,9 +7657,7 @@ cdef class cudaChannelFormatDesc: {{if 'cudaChannelFormatDesc.f' in found_struct}} @property def f(self): - if self._pvt_ptr[0].f not in _dict_cudaChannelFormatKind: - return None - return _dict_cudaChannelFormatKind[self._pvt_ptr[0].f] + return cudaChannelFormatKind(self._pvt_ptr[0].f) @f.setter def f(self, f not None : cudaChannelFormatKind): self._pvt_ptr[0].f = int(f) @@ -7167,9 +8443,7 @@ cdef class cudaMemcpy3DParms: {{if 'cudaMemcpy3DParms.kind' in found_struct}} @property def kind(self): - if self._pvt_ptr[0].kind not in _dict_cudaMemcpyKind: - return None - return _dict_cudaMemcpyKind[self._pvt_ptr[0].kind] + return cudaMemcpyKind(self._pvt_ptr[0].kind) @kind.setter def kind(self, kind not None : cudaMemcpyKind): self._pvt_ptr[0].kind = int(kind) @@ -7961,9 +9235,7 @@ cdef class cudaAccessPolicyWindow: {{if 'cudaAccessPolicyWindow.hitProp' in found_struct}} @property def hitProp(self): - if self._pvt_ptr[0].hitProp not in _dict_cudaAccessProperty: - return None - return _dict_cudaAccessProperty[self._pvt_ptr[0].hitProp] + return cudaAccessProperty(self._pvt_ptr[0].hitProp) @hitProp.setter def hitProp(self, hitProp not None : cudaAccessProperty): self._pvt_ptr[0].hitProp = int(hitProp) @@ -7971,9 +9243,7 @@ cdef class cudaAccessPolicyWindow: {{if 'cudaAccessPolicyWindow.missProp' in found_struct}} @property def missProp(self): - if self._pvt_ptr[0].missProp not in _dict_cudaAccessProperty: - return None - return _dict_cudaAccessProperty[self._pvt_ptr[0].missProp] + return cudaAccessProperty(self._pvt_ptr[0].missProp) @missProp.setter def missProp(self, missProp not None : cudaAccessProperty): self._pvt_ptr[0].missProp = int(missProp) @@ -8713,9 +9983,7 @@ cdef class cudaResourceDesc: {{if 'cudaResourceDesc.resType' in found_struct}} @property def resType(self): - if self._pvt_ptr[0].resType not in _dict_cudaResourceType: - return None - return _dict_cudaResourceType[self._pvt_ptr[0].resType] + return cudaResourceType(self._pvt_ptr[0].resType) @resType.setter def resType(self, resType not None : cudaResourceType): self._pvt_ptr[0].resType = int(resType) @@ -8861,9 +10129,7 @@ cdef class cudaResourceViewDesc: {{if 'cudaResourceViewDesc.format' in found_struct}} @property def format(self): - if self._pvt_ptr[0].format not in _dict_cudaResourceViewFormat: - return None - return _dict_cudaResourceViewFormat[self._pvt_ptr[0].format] + return cudaResourceViewFormat(self._pvt_ptr[0].format) @format.setter def format(self, format not None : cudaResourceViewFormat): self._pvt_ptr[0].format = int(format) @@ -9028,9 +10294,7 @@ cdef class cudaPointerAttributes: {{if 'cudaPointerAttributes.type' in found_struct}} @property def type(self): - if self._pvt_ptr[0].type not in _dict_cudaMemoryType: - return None - return _dict_cudaMemoryType[self._pvt_ptr[0].type] + return cudaMemoryType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : cudaMemoryType): self._pvt_ptr[0].type = int(type) @@ -9502,9 +10766,7 @@ cdef class cudaMemLocation: {{if 'cudaMemLocation.type' in found_struct}} @property def type(self): - if self._pvt_ptr[0].type not in _dict_cudaMemLocationType: - return None - return _dict_cudaMemLocationType[self._pvt_ptr[0].type] + return cudaMemLocationType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : cudaMemLocationType): self._pvt_ptr[0].type = int(type) @@ -9583,9 +10845,7 @@ cdef class cudaMemAccessDesc: {{if 'cudaMemAccessDesc.flags' in found_struct}} @property def flags(self): - if self._pvt_ptr[0].flags not in _dict_cudaMemAccessFlags: - return None - return _dict_cudaMemAccessFlags[self._pvt_ptr[0].flags] + return cudaMemAccessFlags(self._pvt_ptr[0].flags) @flags.setter def flags(self, flags not None : cudaMemAccessFlags): self._pvt_ptr[0].flags = int(flags) @@ -9704,9 +10964,7 @@ cdef class cudaMemPoolProps: {{if 'cudaMemPoolProps.allocType' in found_struct}} @property def allocType(self): - if self._pvt_ptr[0].allocType not in _dict_cudaMemAllocationType: - return None - return _dict_cudaMemAllocationType[self._pvt_ptr[0].allocType] + return cudaMemAllocationType(self._pvt_ptr[0].allocType) @allocType.setter def allocType(self, allocType not None : cudaMemAllocationType): self._pvt_ptr[0].allocType = int(allocType) @@ -9714,9 +10972,7 @@ cdef class cudaMemPoolProps: {{if 'cudaMemPoolProps.handleTypes' in found_struct}} @property def handleTypes(self): - if self._pvt_ptr[0].handleTypes not in _dict_cudaMemAllocationHandleType: - return None - return _dict_cudaMemAllocationHandleType[self._pvt_ptr[0].handleTypes] + return cudaMemAllocationHandleType(self._pvt_ptr[0].handleTypes) @handleTypes.setter def handleTypes(self, handleTypes not None : cudaMemAllocationHandleType): self._pvt_ptr[0].handleTypes = int(handleTypes) @@ -10253,9 +11509,7 @@ cdef class cudaMemcpyAttributes: {{if 'cudaMemcpyAttributes.srcAccessOrder' in found_struct}} @property def srcAccessOrder(self): - if self._pvt_ptr[0].srcAccessOrder not in _dict_cudaMemcpySrcAccessOrder: - return None - return _dict_cudaMemcpySrcAccessOrder[self._pvt_ptr[0].srcAccessOrder] + return cudaMemcpySrcAccessOrder(self._pvt_ptr[0].srcAccessOrder) @srcAccessOrder.setter def srcAccessOrder(self, srcAccessOrder not None : cudaMemcpySrcAccessOrder): self._pvt_ptr[0].srcAccessOrder = int(srcAccessOrder) @@ -10683,9 +11937,7 @@ cdef class cudaMemcpy3DOperand: {{if 'cudaMemcpy3DOperand.type' in found_struct}} @property def type(self): - if self._pvt_ptr[0].type not in _dict_cudaMemcpy3DOperandType: - return None - return _dict_cudaMemcpy3DOperandType[self._pvt_ptr[0].type] + return cudaMemcpy3DOperandType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : cudaMemcpy3DOperandType): self._pvt_ptr[0].type = int(type) @@ -10815,9 +12067,7 @@ cdef class cudaMemcpy3DBatchOp: {{if 'cudaMemcpy3DBatchOp.srcAccessOrder' in found_struct}} @property def srcAccessOrder(self): - if self._pvt_ptr[0].srcAccessOrder not in _dict_cudaMemcpySrcAccessOrder: - return None - return _dict_cudaMemcpySrcAccessOrder[self._pvt_ptr[0].srcAccessOrder] + return cudaMemcpySrcAccessOrder(self._pvt_ptr[0].srcAccessOrder) @srcAccessOrder.setter def srcAccessOrder(self, srcAccessOrder not None : cudaMemcpySrcAccessOrder): self._pvt_ptr[0].srcAccessOrder = int(srcAccessOrder) @@ -13042,9 +14292,7 @@ cdef class cudaExternalMemoryHandleDesc: {{if 'cudaExternalMemoryHandleDesc.type' in found_struct}} @property def type(self): - if self._pvt_ptr[0].type not in _dict_cudaExternalMemoryHandleType: - return None - return _dict_cudaExternalMemoryHandleType[self._pvt_ptr[0].type] + return cudaExternalMemoryHandleType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : cudaExternalMemoryHandleType): self._pvt_ptr[0].type = int(type) @@ -13565,9 +14813,7 @@ cdef class cudaExternalSemaphoreHandleDesc: {{if 'cudaExternalSemaphoreHandleDesc.type' in found_struct}} @property def type(self): - if self._pvt_ptr[0].type not in _dict_cudaExternalSemaphoreHandleType: - return None - return _dict_cudaExternalSemaphoreHandleType[self._pvt_ptr[0].type] + return cudaExternalSemaphoreHandleType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : cudaExternalSemaphoreHandleType): self._pvt_ptr[0].type = int(type) @@ -14529,9 +15775,7 @@ cdef class cudaDevWorkqueueConfigResource: {{if 'cudaDevWorkqueueConfigResource.sharingScope' in found_struct}} @property def sharingScope(self): - if self._pvt_ptr[0].sharingScope not in _dict_cudaDevWorkqueueConfigScope: - return None - return _dict_cudaDevWorkqueueConfigScope[self._pvt_ptr[0].sharingScope] + return cudaDevWorkqueueConfigScope(self._pvt_ptr[0].sharingScope) @sharingScope.setter def sharingScope(self, sharingScope not None : cudaDevWorkqueueConfigScope): self._pvt_ptr[0].sharingScope = int(sharingScope) @@ -14849,9 +16093,7 @@ cdef class cudaDevResource_st: {{if 'cudaDevResource_st.type' in found_struct}} @property def type(self): - if self._pvt_ptr[0].type not in _dict_cudaDevResourceType: - return None - return _dict_cudaDevResourceType[self._pvt_ptr[0].type] + return cudaDevResourceType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : cudaDevResourceType): self._pvt_ptr[0].type = int(type) @@ -15983,9 +17225,7 @@ cdef class cudaConditionalNodeParams: {{if 'cudaConditionalNodeParams.type' in found_struct}} @property def type(self): - if self._pvt_ptr[0].type not in _dict_cudaGraphConditionalNodeType: - return None - return _dict_cudaGraphConditionalNodeType[self._pvt_ptr[0].type] + return cudaGraphConditionalNodeType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : cudaGraphConditionalNodeType): self._pvt_ptr[0].type = int(type) @@ -16100,9 +17340,7 @@ cdef class cudaChildGraphNodeParams: {{if 'cudaChildGraphNodeParams.ownership' in found_struct}} @property def ownership(self): - if self._pvt_ptr[0].ownership not in _dict_cudaGraphChildGraphNodeOwnership: - return None - return _dict_cudaGraphChildGraphNodeOwnership[self._pvt_ptr[0].ownership] + return cudaGraphChildGraphNodeOwnership(self._pvt_ptr[0].ownership) @ownership.setter def ownership(self, ownership not None : cudaGraphChildGraphNodeOwnership): self._pvt_ptr[0].ownership = int(ownership) @@ -16464,9 +17702,7 @@ cdef class cudaGraphNodeParams: {{if 'cudaGraphNodeParams.type' in found_struct}} @property def type(self): - if self._pvt_ptr[0].type not in _dict_cudaGraphNodeType: - return None - return _dict_cudaGraphNodeType[self._pvt_ptr[0].type] + return cudaGraphNodeType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : cudaGraphNodeType): self._pvt_ptr[0].type = int(type) @@ -16840,9 +18076,7 @@ cdef class cudaGraphInstantiateParams_st: {{if 'cudaGraphInstantiateParams_st.result_out' in found_struct}} @property def result_out(self): - if self._pvt_ptr[0].result_out not in _dict_cudaGraphInstantiateResult: - return None - return _dict_cudaGraphInstantiateResult[self._pvt_ptr[0].result_out] + return cudaGraphInstantiateResult(self._pvt_ptr[0].result_out) @result_out.setter def result_out(self, result_out not None : cudaGraphInstantiateResult): self._pvt_ptr[0].result_out = int(result_out) @@ -16921,9 +18155,7 @@ cdef class cudaGraphExecUpdateResultInfo_st: {{if 'cudaGraphExecUpdateResultInfo_st.result' in found_struct}} @property def result(self): - if self._pvt_ptr[0].result not in _dict_cudaGraphExecUpdateResult: - return None - return _dict_cudaGraphExecUpdateResult[self._pvt_ptr[0].result] + return cudaGraphExecUpdateResult(self._pvt_ptr[0].result) @result.setter def result(self, result not None : cudaGraphExecUpdateResult): self._pvt_ptr[0].result = int(result) @@ -17225,9 +18457,7 @@ cdef class cudaGraphKernelNodeUpdate: {{if 'cudaGraphKernelNodeUpdate.field' in found_struct}} @property def field(self): - if self._pvt_ptr[0].field not in _dict_cudaGraphKernelNodeField: - return None - return _dict_cudaGraphKernelNodeField[self._pvt_ptr[0].field] + return cudaGraphKernelNodeField(self._pvt_ptr[0].field) @field.setter def field(self, field not None : cudaGraphKernelNodeField): self._pvt_ptr[0].field = int(field) @@ -18017,9 +19247,7 @@ cdef class cudaLaunchAttributeValue: {{if 'cudaLaunchAttributeValue.syncPolicy' in found_struct}} @property def syncPolicy(self): - if self._pvt_ptr[0].syncPolicy not in _dict_cudaSynchronizationPolicy: - return None - return _dict_cudaSynchronizationPolicy[self._pvt_ptr[0].syncPolicy] + return cudaSynchronizationPolicy(self._pvt_ptr[0].syncPolicy) @syncPolicy.setter def syncPolicy(self, syncPolicy not None : cudaSynchronizationPolicy): self._pvt_ptr[0].syncPolicy = int(syncPolicy) @@ -18035,9 +19263,7 @@ cdef class cudaLaunchAttributeValue: {{if 'cudaLaunchAttributeValue.clusterSchedulingPolicyPreference' in found_struct}} @property def clusterSchedulingPolicyPreference(self): - if self._pvt_ptr[0].clusterSchedulingPolicyPreference not in _dict_cudaClusterSchedulingPolicy: - return None - return _dict_cudaClusterSchedulingPolicy[self._pvt_ptr[0].clusterSchedulingPolicyPreference] + return cudaClusterSchedulingPolicy(self._pvt_ptr[0].clusterSchedulingPolicyPreference) @clusterSchedulingPolicyPreference.setter def clusterSchedulingPolicyPreference(self, clusterSchedulingPolicyPreference not None : cudaClusterSchedulingPolicy): self._pvt_ptr[0].clusterSchedulingPolicyPreference = int(clusterSchedulingPolicyPreference) @@ -18077,9 +19303,7 @@ cdef class cudaLaunchAttributeValue: {{if 'cudaLaunchAttributeValue.memSyncDomain' in found_struct}} @property def memSyncDomain(self): - if self._pvt_ptr[0].memSyncDomain not in _dict_cudaLaunchMemSyncDomain: - return None - return _dict_cudaLaunchMemSyncDomain[self._pvt_ptr[0].memSyncDomain] + return cudaLaunchMemSyncDomain(self._pvt_ptr[0].memSyncDomain) @memSyncDomain.setter def memSyncDomain(self, memSyncDomain not None : cudaLaunchMemSyncDomain): self._pvt_ptr[0].memSyncDomain = int(memSyncDomain) @@ -18182,9 +19406,7 @@ cdef class cudaLaunchAttribute_st: {{if 'cudaLaunchAttribute_st.id' in found_struct}} @property def id(self): - if self._pvt_ptr[0].id not in _dict_cudaLaunchAttributeID: - return None - return _dict_cudaLaunchAttributeID[self._pvt_ptr[0].id] + return cudaLaunchAttributeID(self._pvt_ptr[0].id) @id.setter def id(self, id not None : cudaLaunchAttributeID): self._pvt_ptr[0].id = int(id) @@ -18353,9 +19575,7 @@ cdef class cudaAsyncNotificationInfo: {{if 'cudaAsyncNotificationInfo.type' in found_struct}} @property def type(self): - if self._pvt_ptr[0].type not in _dict_cudaAsyncNotificationType: - return None - return _dict_cudaAsyncNotificationType[self._pvt_ptr[0].type] + return cudaAsyncNotificationType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : cudaAsyncNotificationType): self._pvt_ptr[0].type = int(type) @@ -18533,7 +19753,7 @@ cdef class cudaTextureDesc: {{if 'cudaTextureDesc.addressMode' in found_struct}} @property def addressMode(self): - return [_dict_cudaTextureAddressMode[_x] if _x in _dict_cudaTextureAddressMode else None for _x in list(self._pvt_ptr[0].addressMode)] + return [cudaTextureAddressMode(_x) for _x in list(self._pvt_ptr[0].addressMode)] @addressMode.setter def addressMode(self, addressMode): self._pvt_ptr[0].addressMode = [int(_x) for _x in addressMode] @@ -18541,9 +19761,7 @@ cdef class cudaTextureDesc: {{if 'cudaTextureDesc.filterMode' in found_struct}} @property def filterMode(self): - if self._pvt_ptr[0].filterMode not in _dict_cudaTextureFilterMode: - return None - return _dict_cudaTextureFilterMode[self._pvt_ptr[0].filterMode] + return cudaTextureFilterMode(self._pvt_ptr[0].filterMode) @filterMode.setter def filterMode(self, filterMode not None : cudaTextureFilterMode): self._pvt_ptr[0].filterMode = int(filterMode) @@ -18551,9 +19769,7 @@ cdef class cudaTextureDesc: {{if 'cudaTextureDesc.readMode' in found_struct}} @property def readMode(self): - if self._pvt_ptr[0].readMode not in _dict_cudaTextureReadMode: - return None - return _dict_cudaTextureReadMode[self._pvt_ptr[0].readMode] + return cudaTextureReadMode(self._pvt_ptr[0].readMode) @readMode.setter def readMode(self, readMode not None : cudaTextureReadMode): self._pvt_ptr[0].readMode = int(readMode) @@ -18593,9 +19809,7 @@ cdef class cudaTextureDesc: {{if 'cudaTextureDesc.mipmapFilterMode' in found_struct}} @property def mipmapFilterMode(self): - if self._pvt_ptr[0].mipmapFilterMode not in _dict_cudaTextureFilterMode: - return None - return _dict_cudaTextureFilterMode[self._pvt_ptr[0].mipmapFilterMode] + return cudaTextureFilterMode(self._pvt_ptr[0].mipmapFilterMode) @mipmapFilterMode.setter def mipmapFilterMode(self, mipmapFilterMode not None : cudaTextureFilterMode): self._pvt_ptr[0].mipmapFilterMode = int(mipmapFilterMode) @@ -19006,9 +20220,7 @@ cdef class cudaEglFrame_st: {{if True}} @property def frameType(self): - if self._pvt_ptr[0].frameType not in _dict_cudaEglFrameType: - return None - return _dict_cudaEglFrameType[self._pvt_ptr[0].frameType] + return cudaEglFrameType(self._pvt_ptr[0].frameType) @frameType.setter def frameType(self, frameType not None : cudaEglFrameType): self._pvt_ptr[0].frameType = int(frameType) @@ -19016,9 +20228,7 @@ cdef class cudaEglFrame_st: {{if True}} @property def eglColorFormat(self): - if self._pvt_ptr[0].eglColorFormat not in _dict_cudaEglColorFormat: - return None - return _dict_cudaEglColorFormat[self._pvt_ptr[0].eglColorFormat] + return cudaEglColorFormat(self._pvt_ptr[0].eglColorFormat) @eglColorFormat.setter def eglColorFormat(self, eglColorFormat not None : cudaEglColorFormat): self._pvt_ptr[0].eglColorFormat = int(eglColorFormat) @@ -19382,7 +20592,7 @@ def cudaDeviceReset(): """ with nogil: err = cyruntime.cudaDeviceReset() - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaDeviceSynchronize' in found_functions}} @@ -19409,7 +20619,7 @@ def cudaDeviceSynchronize(): """ with nogil: err = cyruntime.cudaDeviceSynchronize() - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaDeviceSetLimit' in found_functions}} @@ -19512,7 +20722,7 @@ def cudaDeviceSetLimit(limit not None : cudaLimit, size_t value): cdef cyruntime.cudaLimit cylimit = int(limit) with nogil: err = cyruntime.cudaDeviceSetLimit(cylimit, value) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaDeviceGetLimit' in found_functions}} @@ -19571,8 +20781,8 @@ def cudaDeviceGetLimit(limit not None : cudaLimit): with nogil: err = cyruntime.cudaDeviceGetLimit(&pValue, cylimit) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pValue) + return (cudaError_t(err), None) + return (cudaError_t(err), pValue) {{endif}} {{if 'cudaDeviceGetTexture1DLinearMaxWidth' in found_functions}} @@ -19609,8 +20819,8 @@ def cudaDeviceGetTexture1DLinearMaxWidth(fmtDesc : Optional[cudaChannelFormatDes with nogil: err = cyruntime.cudaDeviceGetTexture1DLinearMaxWidth(&maxWidthInElements, cyfmtDesc_ptr, device) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], maxWidthInElements) + return (cudaError_t(err), None) + return (cudaError_t(err), maxWidthInElements) {{endif}} {{if 'cudaDeviceGetCacheConfig' in found_functions}} @@ -19659,8 +20869,8 @@ def cudaDeviceGetCacheConfig(): with nogil: err = cyruntime.cudaDeviceGetCacheConfig(&pCacheConfig) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], cudaFuncCache(pCacheConfig)) + return (cudaError_t(err), None) + return (cudaError_t(err), cudaFuncCache(pCacheConfig)) {{endif}} {{if 'cudaDeviceGetStreamPriorityRange' in found_functions}} @@ -19706,8 +20916,8 @@ def cudaDeviceGetStreamPriorityRange(): with nogil: err = cyruntime.cudaDeviceGetStreamPriorityRange(&leastPriority, &greatestPriority) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None, None) - return (_dict_cudaError_t[err], leastPriority, greatestPriority) + return (cudaError_t(err), None, None) + return (cudaError_t(err), leastPriority, greatestPriority) {{endif}} {{if 'cudaDeviceSetCacheConfig' in found_functions}} @@ -19765,7 +20975,7 @@ def cudaDeviceSetCacheConfig(cacheConfig not None : cudaFuncCache): cdef cyruntime.cudaFuncCache cycacheConfig = int(cacheConfig) with nogil: err = cyruntime.cudaDeviceSetCacheConfig(cycacheConfig) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaDeviceGetByPCIBusId' in found_functions}} @@ -19799,8 +21009,8 @@ def cudaDeviceGetByPCIBusId(char* pciBusId): with nogil: err = cyruntime.cudaDeviceGetByPCIBusId(&device, pciBusId) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], device) + return (cudaError_t(err), None) + return (cudaError_t(err), device) {{endif}} {{if 'cudaDeviceGetPCIBusId' in found_functions}} @@ -19840,8 +21050,8 @@ def cudaDeviceGetPCIBusId(int length, int device): with nogil: err = cyruntime.cudaDeviceGetPCIBusId(pciBusId, length, device) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pypciBusId) + return (cudaError_t(err), None) + return (cudaError_t(err), pypciBusId) {{endif}} {{if 'cudaIpcGetEventHandle' in found_functions}} @@ -19901,8 +21111,8 @@ def cudaIpcGetEventHandle(event): with nogil: err = cyruntime.cudaIpcGetEventHandle(handle._pvt_ptr, cyevent) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], handle) + return (cudaError_t(err), None) + return (cudaError_t(err), handle) {{endif}} {{if 'cudaIpcOpenEventHandle' in found_functions}} @@ -19948,8 +21158,8 @@ def cudaIpcOpenEventHandle(handle not None : cudaIpcEventHandle_t): with nogil: err = cyruntime.cudaIpcOpenEventHandle(event._pvt_ptr, handle._pvt_ptr[0]) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], event) + return (cudaError_t(err), None) + return (cudaError_t(err), event) {{endif}} {{if 'cudaIpcGetMemHandle' in found_functions}} @@ -19998,8 +21208,8 @@ def cudaIpcGetMemHandle(devPtr): with nogil: err = cyruntime.cudaIpcGetMemHandle(handle._pvt_ptr, cydevPtr_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], handle) + return (cudaError_t(err), None) + return (cudaError_t(err), handle) {{endif}} {{if 'cudaIpcOpenMemHandle' in found_functions}} @@ -20071,8 +21281,8 @@ def cudaIpcOpenMemHandle(handle not None : cudaIpcMemHandle_t, unsigned int flag with nogil: err = cyruntime.cudaIpcOpenMemHandle(&devPtr, handle._pvt_ptr[0], flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], devPtr) + return (cudaError_t(err), None) + return (cudaError_t(err), devPtr) {{endif}} {{if 'cudaIpcCloseMemHandle' in found_functions}} @@ -20115,7 +21325,7 @@ def cudaIpcCloseMemHandle(devPtr): cdef void* cydevPtr_ptr = cydevPtr.cptr with nogil: err = cyruntime.cudaIpcCloseMemHandle(cydevPtr_ptr) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaDeviceFlushGPUDirectRDMAWrites' in found_functions}} @@ -20158,7 +21368,7 @@ def cudaDeviceFlushGPUDirectRDMAWrites(target not None : cudaFlushGPUDirectRDMAW cdef cyruntime.cudaFlushGPUDirectRDMAWritesScope cyscope = int(scope) with nogil: err = cyruntime.cudaDeviceFlushGPUDirectRDMAWrites(cytarget, cyscope) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaDeviceRegisterAsyncNotification' in found_functions}} @@ -20244,8 +21454,8 @@ def cudaDeviceRegisterAsyncNotification(int device, callbackFunc, userData): else: m_global._allocated[int(callback)] = cbData if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], callback) + return (cudaError_t(err), None) + return (cudaError_t(err), callback) {{endif}} {{if 'cudaDeviceUnregisterAsyncNotification' in found_functions}} @@ -20287,7 +21497,7 @@ def cudaDeviceUnregisterAsyncNotification(int device, callback): if err == cyruntime.cudaSuccess: free(m_global._allocated[pcallback]) m_global._allocated.erase(pcallback) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaDeviceGetSharedMemConfig' in found_functions}} @@ -20330,8 +21540,8 @@ def cudaDeviceGetSharedMemConfig(): with nogil: err = cyruntime.cudaDeviceGetSharedMemConfig(&pConfig) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], cudaSharedMemConfig(pConfig)) + return (cudaError_t(err), None) + return (cudaError_t(err), cudaSharedMemConfig(pConfig)) {{endif}} {{if 'cudaDeviceSetSharedMemConfig' in found_functions}} @@ -20388,7 +21598,7 @@ def cudaDeviceSetSharedMemConfig(config not None : cudaSharedMemConfig): cdef cyruntime.cudaSharedMemConfig cyconfig = int(config) with nogil: err = cyruntime.cudaDeviceSetSharedMemConfig(cyconfig) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGetLastError' in found_functions}} @@ -20416,7 +21626,7 @@ def cudaGetLastError(): """ with nogil: err = cyruntime.cudaGetLastError() - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaPeekAtLastError' in found_functions}} @@ -20445,7 +21655,7 @@ def cudaPeekAtLastError(): """ with nogil: err = cyruntime.cudaPeekAtLastError() - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGetErrorName' in found_functions}} @@ -20536,8 +21746,8 @@ def cudaGetDeviceCount(): with nogil: err = cyruntime.cudaGetDeviceCount(&count) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], count) + return (cudaError_t(err), None) + return (cudaError_t(err), count) {{endif}} {{if 'cudaGetDeviceProperties' in found_functions}} @@ -20568,8 +21778,8 @@ def cudaGetDeviceProperties(int device): with nogil: err = cyruntime.cudaGetDeviceProperties(prop._pvt_ptr, device) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], prop) + return (cudaError_t(err), None) + return (cudaError_t(err), prop) {{endif}} {{if 'cudaDeviceGetAttribute' in found_functions}} @@ -20604,8 +21814,8 @@ def cudaDeviceGetAttribute(attr not None : cudaDeviceAttr, int device): with nogil: err = cyruntime.cudaDeviceGetAttribute(&value, cyattr, device) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], value) + return (cudaError_t(err), None) + return (cudaError_t(err), value) {{endif}} {{if 'cudaDeviceGetHostAtomicCapabilities' in found_functions}} @@ -20667,8 +21877,8 @@ def cudaDeviceGetHostAtomicCapabilities(operations : Optional[tuple[cudaAtomicOp if cycapabilities is not NULL: free(cycapabilities) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pycapabilities) + return (cudaError_t(err), None) + return (cudaError_t(err), pycapabilities) {{endif}} {{if 'cudaDeviceGetDefaultMemPool' in found_functions}} @@ -20700,8 +21910,8 @@ def cudaDeviceGetDefaultMemPool(int device): with nogil: err = cyruntime.cudaDeviceGetDefaultMemPool(memPool._pvt_ptr, device) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], memPool) + return (cudaError_t(err), None) + return (cudaError_t(err), memPool) {{endif}} {{if 'cudaDeviceSetMemPool' in found_functions}} @@ -20746,7 +21956,7 @@ def cudaDeviceSetMemPool(int device, memPool): cymemPool = pmemPool with nogil: err = cyruntime.cudaDeviceSetMemPool(device, cymemPool) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaDeviceGetMemPool' in found_functions}} @@ -20782,8 +21992,8 @@ def cudaDeviceGetMemPool(int device): with nogil: err = cyruntime.cudaDeviceGetMemPool(memPool._pvt_ptr, device) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], memPool) + return (cudaError_t(err), None) + return (cudaError_t(err), memPool) {{endif}} {{if 'cudaDeviceGetNvSciSyncAttributes' in found_functions}} @@ -20869,7 +22079,7 @@ def cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, int device, int flags): cdef void* cynvSciSyncAttrList_ptr = cynvSciSyncAttrList.cptr with nogil: err = cyruntime.cudaDeviceGetNvSciSyncAttributes(cynvSciSyncAttrList_ptr, device, flags) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaDeviceGetP2PAttribute' in found_functions}} @@ -20933,8 +22143,8 @@ def cudaDeviceGetP2PAttribute(attr not None : cudaDeviceP2PAttr, int srcDevice, with nogil: err = cyruntime.cudaDeviceGetP2PAttribute(&value, cyattr, srcDevice, dstDevice) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], value) + return (cudaError_t(err), None) + return (cudaError_t(err), value) {{endif}} {{if 'cudaDeviceGetP2PAtomicCapabilities' in found_functions}} @@ -21000,8 +22210,8 @@ def cudaDeviceGetP2PAtomicCapabilities(operations : Optional[tuple[cudaAtomicOpe if cycapabilities is not NULL: free(cycapabilities) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pycapabilities) + return (cudaError_t(err), None) + return (cudaError_t(err), pycapabilities) {{endif}} {{if 'cudaChooseDevice' in found_functions}} @@ -21034,8 +22244,8 @@ def cudaChooseDevice(prop : Optional[cudaDeviceProp]): with nogil: err = cyruntime.cudaChooseDevice(&device, cyprop_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], device) + return (cudaError_t(err), None) + return (cudaError_t(err), device) {{endif}} {{if 'cudaInitDevice' in found_functions}} @@ -21078,7 +22288,7 @@ def cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags): """ with nogil: err = cyruntime.cudaInitDevice(device, deviceFlags, flags) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaSetDevice' in found_functions}} @@ -21134,7 +22344,7 @@ def cudaSetDevice(int device): """ with nogil: err = cyruntime.cudaSetDevice(device) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGetDevice' in found_functions}} @@ -21161,8 +22371,8 @@ def cudaGetDevice(): with nogil: err = cyruntime.cudaGetDevice(&device) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], device) + return (cudaError_t(err), None) + return (cudaError_t(err), device) {{endif}} {{if 'cudaSetDeviceFlags' in found_functions}} @@ -21249,7 +22459,7 @@ def cudaSetDeviceFlags(unsigned int flags): """ with nogil: err = cyruntime.cudaSetDeviceFlags(flags) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGetDeviceFlags' in found_functions}} @@ -21298,8 +22508,8 @@ def cudaGetDeviceFlags(): with nogil: err = cyruntime.cudaGetDeviceFlags(&flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], flags) + return (cudaError_t(err), None) + return (cudaError_t(err), flags) {{endif}} {{if 'cudaStreamCreate' in found_functions}} @@ -21328,8 +22538,8 @@ def cudaStreamCreate(): with nogil: err = cyruntime.cudaStreamCreate(pStream._pvt_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pStream) + return (cudaError_t(err), None) + return (cudaError_t(err), pStream) {{endif}} {{if 'cudaStreamCreateWithFlags' in found_functions}} @@ -21372,8 +22582,8 @@ def cudaStreamCreateWithFlags(unsigned int flags): with nogil: err = cyruntime.cudaStreamCreateWithFlags(pStream._pvt_ptr, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pStream) + return (cudaError_t(err), None) + return (cudaError_t(err), pStream) {{endif}} {{if 'cudaStreamCreateWithPriority' in found_functions}} @@ -21433,8 +22643,8 @@ def cudaStreamCreateWithPriority(unsigned int flags, int priority): with nogil: err = cyruntime.cudaStreamCreateWithPriority(pStream._pvt_ptr, flags, priority) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pStream) + return (cudaError_t(err), None) + return (cudaError_t(err), pStream) {{endif}} {{if 'cudaStreamGetPriority' in found_functions}} @@ -21479,8 +22689,8 @@ def cudaStreamGetPriority(hStream): with nogil: err = cyruntime.cudaStreamGetPriority(cyhStream, &priority) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], priority) + return (cudaError_t(err), None) + return (cudaError_t(err), priority) {{endif}} {{if 'cudaStreamGetFlags' in found_functions}} @@ -21521,8 +22731,8 @@ def cudaStreamGetFlags(hStream): with nogil: err = cyruntime.cudaStreamGetFlags(cyhStream, &flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], flags) + return (cudaError_t(err), None) + return (cudaError_t(err), flags) {{endif}} {{if 'cudaStreamGetId' in found_functions}} @@ -21577,8 +22787,8 @@ def cudaStreamGetId(hStream): with nogil: err = cyruntime.cudaStreamGetId(cyhStream, &streamId) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], streamId) + return (cudaError_t(err), None) + return (cudaError_t(err), streamId) {{endif}} {{if 'cudaStreamGetDevice' in found_functions}} @@ -21617,8 +22827,8 @@ def cudaStreamGetDevice(hStream): with nogil: err = cyruntime.cudaStreamGetDevice(cyhStream, &device) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], device) + return (cudaError_t(err), None) + return (cudaError_t(err), device) {{endif}} {{if 'cudaCtxResetPersistingL2Cache' in found_functions}} @@ -21641,7 +22851,7 @@ def cudaCtxResetPersistingL2Cache(): """ with nogil: err = cyruntime.cudaCtxResetPersistingL2Cache() - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaStreamCopyAttributes' in found_functions}} @@ -21687,7 +22897,7 @@ def cudaStreamCopyAttributes(dst, src): cydst = pdst with nogil: err = cyruntime.cudaStreamCopyAttributes(cydst, cysrc) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaStreamGetAttribute' in found_functions}} @@ -21730,8 +22940,8 @@ def cudaStreamGetAttribute(hStream, attr not None : cudaStreamAttrID): with nogil: err = cyruntime.cudaStreamGetAttribute(cyhStream, cyattr, value_out._pvt_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], value_out) + return (cudaError_t(err), None) + return (cudaError_t(err), value_out) {{endif}} {{if 'cudaStreamSetAttribute' in found_functions}} @@ -21774,7 +22984,7 @@ def cudaStreamSetAttribute(hStream, attr not None : cudaStreamAttrID, value : Op cdef cyruntime.cudaStreamAttrValue* cyvalue_ptr = value._pvt_ptr if value is not None else NULL with nogil: err = cyruntime.cudaStreamSetAttribute(cyhStream, cyattr, cyvalue_ptr) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaStreamDestroy' in found_functions}} @@ -21814,7 +23024,7 @@ def cudaStreamDestroy(stream): cystream = pstream with nogil: err = cyruntime.cudaStreamDestroy(cystream) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaStreamWaitEvent' in found_functions}} @@ -21872,7 +23082,7 @@ def cudaStreamWaitEvent(stream, event, unsigned int flags): cystream = pstream with nogil: err = cyruntime.cudaStreamWaitEvent(cystream, cyevent, flags) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaStreamAddCallback' in found_functions}} @@ -21989,7 +23199,7 @@ def cudaStreamAddCallback(stream, callback, userData, unsigned int flags): err = cyruntime.cudaStreamAddCallback(cystream, cudaStreamRtCallbackWrapper, cbData, flags) if err != cyruntime.cudaSuccess: free(cbData) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaStreamSynchronize' in found_functions}} @@ -22027,7 +23237,7 @@ def cudaStreamSynchronize(stream): cystream = pstream with nogil: err = cyruntime.cudaStreamSynchronize(cystream) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaStreamQuery' in found_functions}} @@ -22067,7 +23277,7 @@ def cudaStreamQuery(stream): cystream = pstream with nogil: err = cyruntime.cudaStreamQuery(cystream) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaStreamAttachMemAsync' in found_functions}} @@ -22178,7 +23388,7 @@ def cudaStreamAttachMemAsync(stream, devPtr, size_t length, unsigned int flags): cdef void* cydevPtr_ptr = cydevPtr.cptr with nogil: err = cyruntime.cudaStreamAttachMemAsync(cystream, cydevPtr_ptr, length, flags) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaStreamBeginCapture' in found_functions}} @@ -22235,7 +23445,7 @@ def cudaStreamBeginCapture(stream, mode not None : cudaStreamCaptureMode): cdef cyruntime.cudaStreamCaptureMode cymode = int(mode) with nogil: err = cyruntime.cudaStreamBeginCapture(cystream, cymode) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaStreamBeginCaptureToGraph' in found_functions}} @@ -22340,7 +23550,7 @@ def cudaStreamBeginCaptureToGraph(stream, graph, dependencies : Optional[tuple[c free(cydependencies) if len(dependencyData) > 1 and cydependencyData is not NULL: free(cydependencyData) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaThreadExchangeStreamCaptureMode' in found_functions}} @@ -22413,8 +23623,8 @@ def cudaThreadExchangeStreamCaptureMode(mode not None : cudaStreamCaptureMode): with nogil: err = cyruntime.cudaThreadExchangeStreamCaptureMode(&cymode) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], cudaStreamCaptureMode(cymode)) + return (cudaError_t(err), None) + return (cudaError_t(err), cudaStreamCaptureMode(cymode)) {{endif}} {{if 'cudaStreamEndCapture' in found_functions}} @@ -22461,8 +23671,8 @@ def cudaStreamEndCapture(stream): with nogil: err = cyruntime.cudaStreamEndCapture(cystream, pGraph._pvt_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pGraph) + return (cudaError_t(err), None) + return (cudaError_t(err), pGraph) {{endif}} {{if 'cudaStreamIsCapturing' in found_functions}} @@ -22523,8 +23733,8 @@ def cudaStreamIsCapturing(stream): with nogil: err = cyruntime.cudaStreamIsCapturing(cystream, &pCaptureStatus) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], cudaStreamCaptureStatus(pCaptureStatus)) + return (cudaError_t(err), None) + return (cudaError_t(err), cudaStreamCaptureStatus(pCaptureStatus)) {{endif}} {{if 'cudaStreamGetCaptureInfo' in found_functions}} @@ -22623,8 +23833,8 @@ def cudaStreamGetCaptureInfo(stream): if cudaError_t(err) == cudaError_t(0): pyedgeData_out = [cudaGraphEdgeData(_ptr=&cyedgeData_out[idx]) for idx in range(numDependencies_out)] if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None, None, None, None, None, None) - return (_dict_cudaError_t[err], cudaStreamCaptureStatus(captureStatus_out), id_out, graph_out, pydependencies_out, pyedgeData_out, numDependencies_out) + return (cudaError_t(err), None, None, None, None, None, None) + return (cudaError_t(err), cudaStreamCaptureStatus(captureStatus_out), id_out, graph_out, pydependencies_out, pyedgeData_out, numDependencies_out) {{endif}} {{if 'cudaStreamUpdateCaptureDependencies' in found_functions}} @@ -22711,7 +23921,7 @@ def cudaStreamUpdateCaptureDependencies(stream, dependencies : Optional[tuple[cu free(cydependencies) if len(dependencyData) > 1 and cydependencyData is not NULL: free(cydependencyData) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaEventCreate' in found_functions}} @@ -22738,8 +23948,8 @@ def cudaEventCreate(): with nogil: err = cyruntime.cudaEventCreate(event._pvt_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], event) + return (cudaError_t(err), None) + return (cudaError_t(err), event) {{endif}} {{if 'cudaEventCreateWithFlags' in found_functions}} @@ -22790,8 +24000,8 @@ def cudaEventCreateWithFlags(unsigned int flags): with nogil: err = cyruntime.cudaEventCreateWithFlags(event._pvt_ptr, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], event) + return (cudaError_t(err), None) + return (cudaError_t(err), event) {{endif}} {{if 'cudaEventRecord' in found_functions}} @@ -22850,7 +24060,7 @@ def cudaEventRecord(event, stream): cyevent = pevent with nogil: err = cyruntime.cudaEventRecord(cyevent, cystream) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaEventRecordWithFlags' in found_functions}} @@ -22918,7 +24128,7 @@ def cudaEventRecordWithFlags(event, stream, unsigned int flags): cyevent = pevent with nogil: err = cyruntime.cudaEventRecordWithFlags(cyevent, cystream, flags) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaEventQuery' in found_functions}} @@ -22963,7 +24173,7 @@ def cudaEventQuery(event): cyevent = pevent with nogil: err = cyruntime.cudaEventQuery(cyevent) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaEventSynchronize' in found_functions}} @@ -23007,7 +24217,7 @@ def cudaEventSynchronize(event): cyevent = pevent with nogil: err = cyruntime.cudaEventSynchronize(cyevent) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaEventDestroy' in found_functions}} @@ -23048,7 +24258,7 @@ def cudaEventDestroy(event): cyevent = pevent with nogil: err = cyruntime.cudaEventDestroy(cyevent) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaEventElapsedTime' in found_functions}} @@ -23120,8 +24330,8 @@ def cudaEventElapsedTime(start, end): with nogil: err = cyruntime.cudaEventElapsedTime(&ms, cystart, cyend) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], ms) + return (cudaError_t(err), None) + return (cudaError_t(err), ms) {{endif}} {{if 'cudaImportExternalMemory' in found_functions}} @@ -23274,8 +24484,8 @@ def cudaImportExternalMemory(memHandleDesc : Optional[cudaExternalMemoryHandleDe with nogil: err = cyruntime.cudaImportExternalMemory(extMem_out._pvt_ptr, cymemHandleDesc_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], extMem_out) + return (cudaError_t(err), None) + return (cudaError_t(err), extMem_out) {{endif}} {{if 'cudaExternalMemoryGetMappedBuffer' in found_functions}} @@ -23342,8 +24552,8 @@ def cudaExternalMemoryGetMappedBuffer(extMem, bufferDesc : Optional[cudaExternal with nogil: err = cyruntime.cudaExternalMemoryGetMappedBuffer(&devPtr, cyextMem, cybufferDesc_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], devPtr) + return (cudaError_t(err), None) + return (cudaError_t(err), devPtr) {{endif}} {{if 'cudaExternalMemoryGetMappedMipmappedArray' in found_functions}} @@ -23414,8 +24624,8 @@ def cudaExternalMemoryGetMappedMipmappedArray(extMem, mipmapDesc : Optional[cuda with nogil: err = cyruntime.cudaExternalMemoryGetMappedMipmappedArray(mipmap._pvt_ptr, cyextMem, cymipmapDesc_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], mipmap) + return (cudaError_t(err), None) + return (cudaError_t(err), mipmap) {{endif}} {{if 'cudaDestroyExternalMemory' in found_functions}} @@ -23453,7 +24663,7 @@ def cudaDestroyExternalMemory(extMem): cyextMem = pextMem with nogil: err = cyruntime.cudaDestroyExternalMemory(cyextMem) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaImportExternalSemaphore' in found_functions}} @@ -23601,8 +24811,8 @@ def cudaImportExternalSemaphore(semHandleDesc : Optional[cudaExternalSemaphoreHa with nogil: err = cyruntime.cudaImportExternalSemaphore(extSem_out._pvt_ptr, cysemHandleDesc_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], extSem_out) + return (cudaError_t(err), None) + return (cudaError_t(err), extSem_out) {{endif}} {{if 'cudaSignalExternalSemaphoresAsync' in found_functions}} @@ -23758,7 +24968,7 @@ def cudaSignalExternalSemaphoresAsync(extSemArray : Optional[tuple[cudaExternalS free(cyextSemArray) if len(paramsArray) > 1 and cyparamsArray is not NULL: free(cyparamsArray) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaWaitExternalSemaphoresAsync' in found_functions}} @@ -23887,7 +25097,7 @@ def cudaWaitExternalSemaphoresAsync(extSemArray : Optional[tuple[cudaExternalSem free(cyextSemArray) if len(paramsArray) > 1 and cyparamsArray is not NULL: free(cyparamsArray) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaDestroyExternalSemaphore' in found_functions}} @@ -23924,7 +25134,7 @@ def cudaDestroyExternalSemaphore(extSem): cyextSem = pextSem with nogil: err = cyruntime.cudaDestroyExternalSemaphore(cyextSem) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaFuncSetCacheConfig' in found_functions}} @@ -23991,7 +25201,7 @@ def cudaFuncSetCacheConfig(func, cacheConfig not None : cudaFuncCache): cdef cyruntime.cudaFuncCache cycacheConfig = int(cacheConfig) with nogil: err = cyruntime.cudaFuncSetCacheConfig(cyfunc_ptr, cycacheConfig) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaFuncGetAttributes' in found_functions}} @@ -24034,8 +25244,8 @@ def cudaFuncGetAttributes(func): with nogil: err = cyruntime.cudaFuncGetAttributes(attr._pvt_ptr, cyfunc_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], attr) + return (cudaError_t(err), None) + return (cudaError_t(err), attr) {{endif}} {{if 'cudaFuncSetAttribute' in found_functions}} @@ -24121,7 +25331,7 @@ def cudaFuncSetAttribute(func, attr not None : cudaFuncAttribute, int value): cdef cyruntime.cudaFuncAttribute cyattr = int(attr) with nogil: err = cyruntime.cudaFuncSetAttribute(cyfunc_ptr, cyattr, value) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaLaunchHostFunc' in found_functions}} @@ -24231,7 +25441,7 @@ def cudaLaunchHostFunc(stream, fn, userData): err = cyruntime.cudaLaunchHostFunc(cystream, cudaStreamRtHostCallbackWrapper, cbData) if err != cyruntime.cudaSuccess: free(cbData) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaFuncSetSharedMemConfig' in found_functions}} @@ -24299,7 +25509,7 @@ def cudaFuncSetSharedMemConfig(func, config not None : cudaSharedMemConfig): cdef cyruntime.cudaSharedMemConfig cyconfig = int(config) with nogil: err = cyruntime.cudaFuncSetSharedMemConfig(cyfunc_ptr, cyconfig) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaOccupancyMaxActiveBlocksPerMultiprocessor' in found_functions}} @@ -24337,8 +25547,8 @@ def cudaOccupancyMaxActiveBlocksPerMultiprocessor(func, int blockSize, size_t dy with nogil: err = cyruntime.cudaOccupancyMaxActiveBlocksPerMultiprocessor(&numBlocks, cyfunc_ptr, blockSize, dynamicSMemSize) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], numBlocks) + return (cudaError_t(err), None) + return (cudaError_t(err), numBlocks) {{endif}} {{if 'cudaOccupancyAvailableDynamicSMemPerBlock' in found_functions}} @@ -24376,8 +25586,8 @@ def cudaOccupancyAvailableDynamicSMemPerBlock(func, int numBlocks, int blockSize with nogil: err = cyruntime.cudaOccupancyAvailableDynamicSMemPerBlock(&dynamicSmemSize, cyfunc_ptr, numBlocks, blockSize) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], dynamicSmemSize) + return (cudaError_t(err), None) + return (cudaError_t(err), dynamicSmemSize) {{endif}} {{if 'cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags' in found_functions}} @@ -24432,8 +25642,8 @@ def cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(func, int blockSize, with nogil: err = cyruntime.cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(&numBlocks, cyfunc_ptr, blockSize, dynamicSMemSize, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], numBlocks) + return (cudaError_t(err), None) + return (cudaError_t(err), numBlocks) {{endif}} {{if 'cudaMallocManaged' in found_functions}} @@ -24566,8 +25776,8 @@ def cudaMallocManaged(size_t size, unsigned int flags): with nogil: err = cyruntime.cudaMallocManaged(&devPtr, size, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], devPtr) + return (cudaError_t(err), None) + return (cudaError_t(err), devPtr) {{endif}} {{if 'cudaMalloc' in found_functions}} @@ -24605,8 +25815,8 @@ def cudaMalloc(size_t size): with nogil: err = cyruntime.cudaMalloc(&devPtr, size) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], devPtr) + return (cudaError_t(err), None) + return (cudaError_t(err), devPtr) {{endif}} {{if 'cudaMallocHost' in found_functions}} @@ -24653,8 +25863,8 @@ def cudaMallocHost(size_t size): with nogil: err = cyruntime.cudaMallocHost(&ptr, size) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], ptr) + return (cudaError_t(err), None) + return (cudaError_t(err), ptr) {{endif}} {{if 'cudaMallocPitch' in found_functions}} @@ -24709,8 +25919,8 @@ def cudaMallocPitch(size_t width, size_t height): with nogil: err = cyruntime.cudaMallocPitch(&devPtr, &pitch, width, height) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None, None) - return (_dict_cudaError_t[err], devPtr, pitch) + return (cudaError_t(err), None, None) + return (cudaError_t(err), devPtr, pitch) {{endif}} {{if 'cudaMallocArray' in found_functions}} @@ -24786,8 +25996,8 @@ def cudaMallocArray(desc : Optional[cudaChannelFormatDesc], size_t width, size_t with nogil: err = cyruntime.cudaMallocArray(array._pvt_ptr, cydesc_ptr, width, height, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], array) + return (cudaError_t(err), None) + return (cudaError_t(err), array) {{endif}} {{if 'cudaFree' in found_functions}} @@ -24837,7 +26047,7 @@ def cudaFree(devPtr): cdef void* cydevPtr_ptr = cydevPtr.cptr with nogil: err = cyruntime.cudaFree(cydevPtr_ptr) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaFreeHost' in found_functions}} @@ -24868,7 +26078,7 @@ def cudaFreeHost(ptr): cdef void* cyptr_ptr = cyptr.cptr with nogil: err = cyruntime.cudaFreeHost(cyptr_ptr) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaFreeArray' in found_functions}} @@ -24905,7 +26115,7 @@ def cudaFreeArray(array): cyarray = parray with nogil: err = cyruntime.cudaFreeArray(cyarray) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaFreeMipmappedArray' in found_functions}} @@ -24942,7 +26152,7 @@ def cudaFreeMipmappedArray(mipmappedArray): cymipmappedArray = pmipmappedArray with nogil: err = cyruntime.cudaFreeMipmappedArray(cymipmappedArray) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaHostAlloc' in found_functions}} @@ -25026,8 +26236,8 @@ def cudaHostAlloc(size_t size, unsigned int flags): with nogil: err = cyruntime.cudaHostAlloc(&pHost, size, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pHost) + return (cudaError_t(err), None) + return (cudaError_t(err), pHost) {{endif}} {{if 'cudaHostRegister' in found_functions}} @@ -25144,7 +26354,7 @@ def cudaHostRegister(ptr, size_t size, unsigned int flags): cdef void* cyptr_ptr = cyptr.cptr with nogil: err = cyruntime.cudaHostRegister(cyptr_ptr, size, flags) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaHostUnregister' in found_functions}} @@ -25177,7 +26387,7 @@ def cudaHostUnregister(ptr): cdef void* cyptr_ptr = cyptr.cptr with nogil: err = cyruntime.cudaHostUnregister(cyptr_ptr) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaHostGetDevicePointer' in found_functions}} @@ -25238,8 +26448,8 @@ def cudaHostGetDevicePointer(pHost, unsigned int flags): with nogil: err = cyruntime.cudaHostGetDevicePointer(&pDevice, cypHost_ptr, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pDevice) + return (cudaError_t(err), None) + return (cudaError_t(err), pDevice) {{endif}} {{if 'cudaHostGetFlags' in found_functions}} @@ -25273,8 +26483,8 @@ def cudaHostGetFlags(pHost): with nogil: err = cyruntime.cudaHostGetFlags(&pFlags, cypHost_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pFlags) + return (cudaError_t(err), None) + return (cudaError_t(err), pFlags) {{endif}} {{if 'cudaMalloc3D' in found_functions}} @@ -25322,8 +26532,8 @@ def cudaMalloc3D(extent not None : cudaExtent): with nogil: err = cyruntime.cudaMalloc3D(pitchedDevPtr._pvt_ptr, extent._pvt_ptr[0]) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pitchedDevPtr) + return (cudaError_t(err), None) + return (cudaError_t(err), pitchedDevPtr) {{endif}} {{if 'cudaMalloc3DArray' in found_functions}} @@ -25445,8 +26655,8 @@ def cudaMalloc3DArray(desc : Optional[cudaChannelFormatDesc], extent not None : with nogil: err = cyruntime.cudaMalloc3DArray(array._pvt_ptr, cydesc_ptr, extent._pvt_ptr[0], flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], array) + return (cudaError_t(err), None) + return (cudaError_t(err), array) {{endif}} {{if 'cudaMallocMipmappedArray' in found_functions}} @@ -25571,8 +26781,8 @@ def cudaMallocMipmappedArray(desc : Optional[cudaChannelFormatDesc], extent not with nogil: err = cyruntime.cudaMallocMipmappedArray(mipmappedArray._pvt_ptr, cydesc_ptr, extent._pvt_ptr[0], numLevels, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], mipmappedArray) + return (cudaError_t(err), None) + return (cudaError_t(err), mipmappedArray) {{endif}} {{if 'cudaGetMipmappedArrayLevel' in found_functions}} @@ -25620,8 +26830,8 @@ def cudaGetMipmappedArrayLevel(mipmappedArray, unsigned int level): with nogil: err = cyruntime.cudaGetMipmappedArrayLevel(levelArray._pvt_ptr, cymipmappedArray, level) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], levelArray) + return (cudaError_t(err), None) + return (cudaError_t(err), levelArray) {{endif}} {{if 'cudaMemcpy3D' in found_functions}} @@ -25705,7 +26915,7 @@ def cudaMemcpy3D(p : Optional[cudaMemcpy3DParms]): cdef cyruntime.cudaMemcpy3DParms* cyp_ptr = p._pvt_ptr if p is not None else NULL with nogil: err = cyruntime.cudaMemcpy3D(cyp_ptr) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemcpy3DPeer' in found_functions}} @@ -25742,7 +26952,7 @@ def cudaMemcpy3DPeer(p : Optional[cudaMemcpy3DPeerParms]): cdef cyruntime.cudaMemcpy3DPeerParms* cyp_ptr = p._pvt_ptr if p is not None else NULL with nogil: err = cyruntime.cudaMemcpy3DPeer(cyp_ptr) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemcpy3DAsync' in found_functions}} @@ -25847,7 +27057,7 @@ def cudaMemcpy3DAsync(p : Optional[cudaMemcpy3DParms], stream): cdef cyruntime.cudaMemcpy3DParms* cyp_ptr = p._pvt_ptr if p is not None else NULL with nogil: err = cyruntime.cudaMemcpy3DAsync(cyp_ptr, cystream) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemcpy3DPeerAsync' in found_functions}} @@ -25887,7 +27097,7 @@ def cudaMemcpy3DPeerAsync(p : Optional[cudaMemcpy3DPeerParms], stream): cdef cyruntime.cudaMemcpy3DPeerParms* cyp_ptr = p._pvt_ptr if p is not None else NULL with nogil: err = cyruntime.cudaMemcpy3DPeerAsync(cyp_ptr, cystream) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemGetInfo' in found_functions}} @@ -25931,8 +27141,8 @@ def cudaMemGetInfo(): with nogil: err = cyruntime.cudaMemGetInfo(&free, &total) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None, None) - return (_dict_cudaError_t[err], free, total) + return (cudaError_t(err), None, None) + return (cudaError_t(err), free, total) {{endif}} {{if 'cudaArrayGetInfo' in found_functions}} @@ -25980,8 +27190,8 @@ def cudaArrayGetInfo(array): with nogil: err = cyruntime.cudaArrayGetInfo(desc._pvt_ptr, extent._pvt_ptr, &flags, cyarray) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None, None, None) - return (_dict_cudaError_t[err], desc, extent, flags) + return (cudaError_t(err), None, None, None) + return (cudaError_t(err), desc, extent, flags) {{endif}} {{if 'cudaArrayGetPlane' in found_functions}} @@ -26036,8 +27246,8 @@ def cudaArrayGetPlane(hArray, unsigned int planeIdx): with nogil: err = cyruntime.cudaArrayGetPlane(pPlaneArray._pvt_ptr, cyhArray, planeIdx) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pPlaneArray) + return (cudaError_t(err), None) + return (cudaError_t(err), pPlaneArray) {{endif}} {{if 'cudaArrayGetMemoryRequirements' in found_functions}} @@ -26086,8 +27296,8 @@ def cudaArrayGetMemoryRequirements(array, int device): with nogil: err = cyruntime.cudaArrayGetMemoryRequirements(memoryRequirements._pvt_ptr, cyarray, device) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], memoryRequirements) + return (cudaError_t(err), None) + return (cudaError_t(err), memoryRequirements) {{endif}} {{if 'cudaMipmappedArrayGetMemoryRequirements' in found_functions}} @@ -26136,8 +27346,8 @@ def cudaMipmappedArrayGetMemoryRequirements(mipmap, int device): with nogil: err = cyruntime.cudaMipmappedArrayGetMemoryRequirements(memoryRequirements._pvt_ptr, cymipmap, device) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], memoryRequirements) + return (cudaError_t(err), None) + return (cudaError_t(err), memoryRequirements) {{endif}} {{if 'cudaArrayGetSparseProperties' in found_functions}} @@ -26192,8 +27402,8 @@ def cudaArrayGetSparseProperties(array): with nogil: err = cyruntime.cudaArrayGetSparseProperties(sparseProperties._pvt_ptr, cyarray) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], sparseProperties) + return (cudaError_t(err), None) + return (cudaError_t(err), sparseProperties) {{endif}} {{if 'cudaMipmappedArrayGetSparseProperties' in found_functions}} @@ -26248,8 +27458,8 @@ def cudaMipmappedArrayGetSparseProperties(mipmap): with nogil: err = cyruntime.cudaMipmappedArrayGetSparseProperties(sparseProperties._pvt_ptr, cymipmap) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], sparseProperties) + return (cudaError_t(err), None) + return (cudaError_t(err), sparseProperties) {{endif}} {{if 'cudaMemcpy' in found_functions}} @@ -26299,7 +27509,7 @@ def cudaMemcpy(dst, src, size_t count, kind not None : cudaMemcpyKind): cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpy(cydst_ptr, cysrc_ptr, count, cykind) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemcpyPeer' in found_functions}} @@ -26347,7 +27557,7 @@ def cudaMemcpyPeer(dst, int dstDevice, src, int srcDevice, size_t count): cdef void* cysrc_ptr = cysrc.cptr with nogil: err = cyruntime.cudaMemcpyPeer(cydst_ptr, dstDevice, cysrc_ptr, srcDevice, count) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemcpy2D' in found_functions}} @@ -26407,7 +27617,7 @@ def cudaMemcpy2D(dst, size_t dpitch, src, size_t spitch, size_t width, size_t he cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpy2D(cydst_ptr, dpitch, cysrc_ptr, spitch, width, height, cykind) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemcpy2DToArray' in found_functions}} @@ -26474,7 +27684,7 @@ def cudaMemcpy2DToArray(dst, size_t wOffset, size_t hOffset, src, size_t spitch, cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpy2DToArray(cydst, wOffset, hOffset, cysrc_ptr, spitch, width, height, cykind) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemcpy2DFromArray' in found_functions}} @@ -26541,7 +27751,7 @@ def cudaMemcpy2DFromArray(dst, size_t dpitch, src, size_t wOffset, size_t hOffse cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpy2DFromArray(cydst_ptr, dpitch, cysrc, wOffset, hOffset, width, height, cykind) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemcpy2DArrayToArray' in found_functions}} @@ -26614,7 +27824,7 @@ def cudaMemcpy2DArrayToArray(dst, size_t wOffsetDst, size_t hOffsetDst, src, siz cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpy2DArrayToArray(cydst, wOffsetDst, hOffsetDst, cysrc, wOffsetSrc, hOffsetSrc, width, height, cykind) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemcpyAsync' in found_functions}} @@ -26684,7 +27894,7 @@ def cudaMemcpyAsync(dst, src, size_t count, kind not None : cudaMemcpyKind, stre cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpyAsync(cydst_ptr, cysrc_ptr, count, cykind, cystream) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemcpyPeerAsync' in found_functions}} @@ -26740,7 +27950,7 @@ def cudaMemcpyPeerAsync(dst, int dstDevice, src, int srcDevice, size_t count, st cdef void* cysrc_ptr = cysrc.cptr with nogil: err = cyruntime.cudaMemcpyPeerAsync(cydst_ptr, dstDevice, cysrc_ptr, srcDevice, count, cystream) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemcpyBatchAsync' in found_functions}} @@ -26890,7 +28100,7 @@ def cudaMemcpyBatchAsync(dsts : Optional[tuple[Any] | list[Any]], srcs : Optiona err = cyruntime.cudaMemcpyBatchAsync(cydsts_ptr, cysrcs_ptr, cysizes.data(), count, cyattrs, cyattrsIdxs.data(), numAttrs, cystream) if len(attrs) > 1 and cyattrs is not NULL: free(cyattrs) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemcpy3DBatchAsync' in found_functions}} @@ -27020,7 +28230,7 @@ def cudaMemcpy3DBatchAsync(size_t numOps, opList : Optional[tuple[cudaMemcpy3DBa err = cyruntime.cudaMemcpy3DBatchAsync(numOps, cyopList, flags, cystream) if len(opList) > 1 and cyopList is not NULL: free(cyopList) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemcpy2DAsync' in found_functions}} @@ -27101,7 +28311,7 @@ def cudaMemcpy2DAsync(dst, size_t dpitch, src, size_t spitch, size_t width, size cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpy2DAsync(cydst_ptr, dpitch, cysrc_ptr, spitch, width, height, cykind, cystream) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemcpy2DToArrayAsync' in found_functions}} @@ -27189,7 +28399,7 @@ def cudaMemcpy2DToArrayAsync(dst, size_t wOffset, size_t hOffset, src, size_t sp cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpy2DToArrayAsync(cydst, wOffset, hOffset, cysrc_ptr, spitch, width, height, cykind, cystream) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemcpy2DFromArrayAsync' in found_functions}} @@ -27276,7 +28486,7 @@ def cudaMemcpy2DFromArrayAsync(dst, size_t dpitch, src, size_t wOffset, size_t h cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpy2DFromArrayAsync(cydst_ptr, dpitch, cysrc, wOffset, hOffset, width, height, cykind, cystream) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemset' in found_functions}} @@ -27313,7 +28523,7 @@ def cudaMemset(devPtr, int value, size_t count): cdef void* cydevPtr_ptr = cydevPtr.cptr with nogil: err = cyruntime.cudaMemset(cydevPtr_ptr, value, count) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemset2D' in found_functions}} @@ -27357,7 +28567,7 @@ def cudaMemset2D(devPtr, size_t pitch, int value, size_t width, size_t height): cdef void* cydevPtr_ptr = cydevPtr.cptr with nogil: err = cyruntime.cudaMemset2D(cydevPtr_ptr, pitch, value, width, height) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemset3D' in found_functions}} @@ -27411,7 +28621,7 @@ def cudaMemset3D(pitchedDevPtr not None : cudaPitchedPtr, int value, extent not """ with nogil: err = cyruntime.cudaMemset3D(pitchedDevPtr._pvt_ptr[0], value, extent._pvt_ptr[0]) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemsetAsync' in found_functions}} @@ -27464,7 +28674,7 @@ def cudaMemsetAsync(devPtr, int value, size_t count, stream): cdef void* cydevPtr_ptr = cydevPtr.cptr with nogil: err = cyruntime.cudaMemsetAsync(cydevPtr_ptr, value, count, cystream) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemset2DAsync' in found_functions}} @@ -27524,7 +28734,7 @@ def cudaMemset2DAsync(devPtr, size_t pitch, int value, size_t width, size_t heig cdef void* cydevPtr_ptr = cydevPtr.cptr with nogil: err = cyruntime.cudaMemset2DAsync(cydevPtr_ptr, pitch, value, width, height, cystream) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemset3DAsync' in found_functions}} @@ -27594,7 +28804,7 @@ def cudaMemset3DAsync(pitchedDevPtr not None : cudaPitchedPtr, int value, extent cystream = pstream with nogil: err = cyruntime.cudaMemset3DAsync(pitchedDevPtr._pvt_ptr[0], value, extent._pvt_ptr[0], cystream) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemPrefetchAsync' in found_functions}} @@ -27712,7 +28922,7 @@ def cudaMemPrefetchAsync(devPtr, size_t count, location not None : cudaMemLocati cdef void* cydevPtr_ptr = cydevPtr.cptr with nogil: err = cyruntime.cudaMemPrefetchAsync(cydevPtr_ptr, count, location._pvt_ptr[0], flags, cystream) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemPrefetchBatchAsync' in found_functions}} @@ -27821,7 +29031,7 @@ def cudaMemPrefetchBatchAsync(dptrs : Optional[tuple[Any] | list[Any]], sizes : err = cyruntime.cudaMemPrefetchBatchAsync(cydptrs_ptr, cysizes.data(), count, cyprefetchLocs, cyprefetchLocIdxs.data(), numPrefetchLocs, flags, cystream) if len(prefetchLocs) > 1 and cyprefetchLocs is not NULL: free(cyprefetchLocs) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemDiscardBatchAsync' in found_functions}} @@ -27895,7 +29105,7 @@ def cudaMemDiscardBatchAsync(dptrs : Optional[tuple[Any] | list[Any]], sizes : t if count > len(sizes): raise RuntimeError("List is too small: " + str(len(sizes)) + " < " + str(count)) with nogil: err = cyruntime.cudaMemDiscardBatchAsync(cydptrs_ptr, cysizes.data(), count, flags, cystream) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemDiscardAndPrefetchBatchAsync' in found_functions}} @@ -28012,7 +29222,7 @@ def cudaMemDiscardAndPrefetchBatchAsync(dptrs : Optional[tuple[Any] | list[Any]] err = cyruntime.cudaMemDiscardAndPrefetchBatchAsync(cydptrs_ptr, cysizes.data(), count, cyprefetchLocs, cyprefetchLocIdxs.data(), numPrefetchLocs, flags, cystream) if len(prefetchLocs) > 1 and cyprefetchLocs is not NULL: free(cyprefetchLocs) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemAdvise' in found_functions}} @@ -28209,7 +29419,7 @@ def cudaMemAdvise(devPtr, size_t count, advice not None : cudaMemoryAdvise, loca cdef cyruntime.cudaMemoryAdvise cyadvice = int(advice) with nogil: err = cyruntime.cudaMemAdvise(cydevPtr_ptr, count, cyadvice, location._pvt_ptr[0]) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemRangeGetAttribute' in found_functions}} @@ -28358,8 +29568,8 @@ def cudaMemRangeGetAttribute(size_t dataSize, attribute not None : cudaMemRangeA with nogil: err = cyruntime.cudaMemRangeGetAttribute(cydata_ptr, dataSize, cyattribute, cydevPtr_ptr, count) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], cydata.pyObj()) + return (cudaError_t(err), None) + return (cudaError_t(err), cydata.pyObj()) {{endif}} {{if 'cudaMemRangeGetAttributes' in found_functions}} @@ -28439,8 +29649,8 @@ def cudaMemRangeGetAttributes(dataSizes : tuple[int] | list[int], attributes : O with nogil: err = cyruntime.cudaMemRangeGetAttributes(cyvoidStarHelper_ptr, cydataSizes.data(), cyattributes.data(), numAttributes, cydevPtr_ptr, count) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], [obj.pyObj() for obj in pylist]) + return (cudaError_t(err), None) + return (cudaError_t(err), [obj.pyObj() for obj in pylist]) {{endif}} {{if 'cudaMemcpyToArray' in found_functions}} @@ -28499,7 +29709,7 @@ def cudaMemcpyToArray(dst, size_t wOffset, size_t hOffset, src, size_t count, ki cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpyToArray(cydst, wOffset, hOffset, cysrc_ptr, count, cykind) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemcpyFromArray' in found_functions}} @@ -28558,7 +29768,7 @@ def cudaMemcpyFromArray(dst, src, size_t wOffset, size_t hOffset, size_t count, cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpyFromArray(cydst_ptr, cysrc, wOffset, hOffset, count, cykind) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemcpyArrayToArray' in found_functions}} @@ -28628,7 +29838,7 @@ def cudaMemcpyArrayToArray(dst, size_t wOffsetDst, size_t hOffsetDst, src, size_ cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpyArrayToArray(cydst, wOffsetDst, hOffsetDst, cysrc, wOffsetSrc, hOffsetSrc, count, cykind) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemcpyToArrayAsync' in found_functions}} @@ -28704,7 +29914,7 @@ def cudaMemcpyToArrayAsync(dst, size_t wOffset, size_t hOffset, src, size_t coun cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpyToArrayAsync(cydst, wOffset, hOffset, cysrc_ptr, count, cykind, cystream) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemcpyFromArrayAsync' in found_functions}} @@ -28780,7 +29990,7 @@ def cudaMemcpyFromArrayAsync(dst, src, size_t wOffset, size_t hOffset, size_t co cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpyFromArrayAsync(cydst_ptr, cysrc, wOffset, hOffset, count, cykind, cystream) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMallocAsync' in found_functions}} @@ -28834,8 +30044,8 @@ def cudaMallocAsync(size_t size, hStream): with nogil: err = cyruntime.cudaMallocAsync(&devPtr, size, cyhStream) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], devPtr) + return (cudaError_t(err), None) + return (cudaError_t(err), devPtr) {{endif}} {{if 'cudaFreeAsync' in found_functions}} @@ -28881,7 +30091,7 @@ def cudaFreeAsync(devPtr, hStream): cdef void* cydevPtr_ptr = cydevPtr.cptr with nogil: err = cyruntime.cudaFreeAsync(cydevPtr_ptr, cyhStream) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemPoolTrimTo' in found_functions}} @@ -28931,7 +30141,7 @@ def cudaMemPoolTrimTo(memPool, size_t minBytesToKeep): cymemPool = pmemPool with nogil: err = cyruntime.cudaMemPoolTrimTo(cymemPool, minBytesToKeep) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemPoolSetAttribute' in found_functions}} @@ -29007,7 +30217,7 @@ def cudaMemPoolSetAttribute(memPool, attr not None : cudaMemPoolAttr, value): cdef void* cyvalue_ptr = cyvalue.cptr with nogil: err = cyruntime.cudaMemPoolSetAttribute(cymemPool, cyattr, cyvalue_ptr) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemPoolGetAttribute' in found_functions}} @@ -29090,8 +30300,8 @@ def cudaMemPoolGetAttribute(memPool, attr not None : cudaMemPoolAttr): with nogil: err = cyruntime.cudaMemPoolGetAttribute(cymemPool, cyattr, cyvalue_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], cyvalue.pyObj()) + return (cudaError_t(err), None) + return (cudaError_t(err), cyvalue.pyObj()) {{endif}} {{if 'cudaMemPoolSetAccess' in found_functions}} @@ -29144,7 +30354,7 @@ def cudaMemPoolSetAccess(memPool, descList : Optional[tuple[cudaMemAccessDesc] | err = cyruntime.cudaMemPoolSetAccess(cymemPool, cydescList, count) if len(descList) > 1 and cydescList is not NULL: free(cydescList) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemPoolGetAccess' in found_functions}} @@ -29187,8 +30397,8 @@ def cudaMemPoolGetAccess(memPool, location : Optional[cudaMemLocation]): with nogil: err = cyruntime.cudaMemPoolGetAccess(&flags, cymemPool, cylocation_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], cudaMemAccessFlags(flags)) + return (cudaError_t(err), None) + return (cudaError_t(err), cudaMemAccessFlags(flags)) {{endif}} {{if 'cudaMemPoolCreate' in found_functions}} @@ -29287,8 +30497,8 @@ def cudaMemPoolCreate(poolProps : Optional[cudaMemPoolProps]): with nogil: err = cyruntime.cudaMemPoolCreate(memPool._pvt_ptr, cypoolProps_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], memPool) + return (cudaError_t(err), None) + return (cudaError_t(err), memPool) {{endif}} {{if 'cudaMemPoolDestroy' in found_functions}} @@ -29334,7 +30544,7 @@ def cudaMemPoolDestroy(memPool): cymemPool = pmemPool with nogil: err = cyruntime.cudaMemPoolDestroy(cymemPool) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMemGetDefaultMemPool' in found_functions}} @@ -29378,8 +30588,8 @@ def cudaMemGetDefaultMemPool(location : Optional[cudaMemLocation], typename not with nogil: err = cyruntime.cudaMemGetDefaultMemPool(memPool._pvt_ptr, cylocation_ptr, cytypename) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], memPool) + return (cudaError_t(err), None) + return (cudaError_t(err), memPool) {{endif}} {{if 'cudaMemGetMemPool' in found_functions}} @@ -29432,8 +30642,8 @@ def cudaMemGetMemPool(location : Optional[cudaMemLocation], typename not None : with nogil: err = cyruntime.cudaMemGetMemPool(memPool._pvt_ptr, cylocation_ptr, cytypename) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], memPool) + return (cudaError_t(err), None) + return (cudaError_t(err), memPool) {{endif}} {{if 'cudaMemSetMemPool' in found_functions}} @@ -29500,7 +30710,7 @@ def cudaMemSetMemPool(location : Optional[cudaMemLocation], typename not None : cdef cyruntime.cudaMemAllocationType cytypename = int(typename) with nogil: err = cyruntime.cudaMemSetMemPool(cylocation_ptr, cytypename, cymemPool) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaMallocFromPoolAsync' in found_functions}} @@ -29558,8 +30768,8 @@ def cudaMallocFromPoolAsync(size_t size, memPool, stream): with nogil: err = cyruntime.cudaMallocFromPoolAsync(&ptr, size, cymemPool, cystream) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], ptr) + return (cudaError_t(err), None) + return (cudaError_t(err), ptr) {{endif}} {{if 'cudaMemPoolExportToShareableHandle' in found_functions}} @@ -29615,8 +30825,8 @@ def cudaMemPoolExportToShareableHandle(memPool, handleType not None : cudaMemAll with nogil: err = cyruntime.cudaMemPoolExportToShareableHandle(cyshareableHandle_ptr, cymemPool, cyhandleType, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], cyshareableHandle.pyObj()) + return (cudaError_t(err), None) + return (cudaError_t(err), cyshareableHandle.pyObj()) {{endif}} {{if 'cudaMemPoolImportFromShareableHandle' in found_functions}} @@ -29659,8 +30869,8 @@ def cudaMemPoolImportFromShareableHandle(shareableHandle, handleType not None : with nogil: err = cyruntime.cudaMemPoolImportFromShareableHandle(memPool._pvt_ptr, cyshareableHandle_ptr, cyhandleType, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], memPool) + return (cudaError_t(err), None) + return (cudaError_t(err), memPool) {{endif}} {{if 'cudaMemPoolExportPointer' in found_functions}} @@ -29696,8 +30906,8 @@ def cudaMemPoolExportPointer(ptr): with nogil: err = cyruntime.cudaMemPoolExportPointer(exportData._pvt_ptr, cyptr_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], exportData) + return (cudaError_t(err), None) + return (cudaError_t(err), exportData) {{endif}} {{if 'cudaMemPoolImportPointer' in found_functions}} @@ -29749,8 +30959,8 @@ def cudaMemPoolImportPointer(memPool, exportData : Optional[cudaMemPoolPtrExport with nogil: err = cyruntime.cudaMemPoolImportPointer(&ptr, cymemPool, cyexportData_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], ptr) + return (cudaError_t(err), None) + return (cudaError_t(err), ptr) {{endif}} {{if 'cudaPointerGetAttributes' in found_functions}} @@ -29821,8 +31031,8 @@ def cudaPointerGetAttributes(ptr): with nogil: err = cyruntime.cudaPointerGetAttributes(attributes._pvt_ptr, cyptr_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], attributes) + return (cudaError_t(err), None) + return (cudaError_t(err), attributes) {{endif}} {{if 'cudaDeviceCanAccessPeer' in found_functions}} @@ -29860,8 +31070,8 @@ def cudaDeviceCanAccessPeer(int device, int peerDevice): with nogil: err = cyruntime.cudaDeviceCanAccessPeer(&canAccessPeer, device, peerDevice) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], canAccessPeer) + return (cudaError_t(err), None) + return (cudaError_t(err), canAccessPeer) {{endif}} {{if 'cudaDeviceEnablePeerAccess' in found_functions}} @@ -29912,7 +31122,7 @@ def cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags): """ with nogil: err = cyruntime.cudaDeviceEnablePeerAccess(peerDevice, flags) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaDeviceDisablePeerAccess' in found_functions}} @@ -29941,7 +31151,7 @@ def cudaDeviceDisablePeerAccess(int peerDevice): """ with nogil: err = cyruntime.cudaDeviceDisablePeerAccess(peerDevice) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphicsUnregisterResource' in found_functions}} @@ -29980,7 +31190,7 @@ def cudaGraphicsUnregisterResource(resource): cyresource = presource with nogil: err = cyruntime.cudaGraphicsUnregisterResource(cyresource) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphicsResourceSetMapFlags' in found_functions}} @@ -30036,7 +31246,7 @@ def cudaGraphicsResourceSetMapFlags(resource, unsigned int flags): cyresource = presource with nogil: err = cyruntime.cudaGraphicsResourceSetMapFlags(cyresource, flags) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphicsMapResources' in found_functions}} @@ -30099,7 +31309,7 @@ def cudaGraphicsMapResources(int count, resources, stream): raise TypeError("Argument 'resources' is not instance of type (expected , found " + str(type(resources))) with nogil: err = cyruntime.cudaGraphicsMapResources(count, cyresources, cystream) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphicsUnmapResources' in found_functions}} @@ -30160,7 +31370,7 @@ def cudaGraphicsUnmapResources(int count, resources, stream): raise TypeError("Argument 'resources' is not instance of type (expected , found " + str(type(resources))) with nogil: err = cyruntime.cudaGraphicsUnmapResources(count, cyresources, cystream) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphicsResourceGetMappedPointer' in found_functions}} @@ -30205,8 +31415,8 @@ def cudaGraphicsResourceGetMappedPointer(resource): with nogil: err = cyruntime.cudaGraphicsResourceGetMappedPointer(&devPtr, &size, cyresource) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None, None) - return (_dict_cudaError_t[err], devPtr, size) + return (cudaError_t(err), None, None) + return (cudaError_t(err), devPtr, size) {{endif}} {{if 'cudaGraphicsSubResourceGetMappedArray' in found_functions}} @@ -30262,8 +31472,8 @@ def cudaGraphicsSubResourceGetMappedArray(resource, unsigned int arrayIndex, uns with nogil: err = cyruntime.cudaGraphicsSubResourceGetMappedArray(array._pvt_ptr, cyresource, arrayIndex, mipLevel) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], array) + return (cudaError_t(err), None) + return (cudaError_t(err), array) {{endif}} {{if 'cudaGraphicsResourceGetMappedMipmappedArray' in found_functions}} @@ -30308,8 +31518,8 @@ def cudaGraphicsResourceGetMappedMipmappedArray(resource): with nogil: err = cyruntime.cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray._pvt_ptr, cyresource) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], mipmappedArray) + return (cudaError_t(err), None) + return (cudaError_t(err), mipmappedArray) {{endif}} {{if 'cudaGetChannelDesc' in found_functions}} @@ -30348,8 +31558,8 @@ def cudaGetChannelDesc(array): with nogil: err = cyruntime.cudaGetChannelDesc(desc._pvt_ptr, cyarray) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], desc) + return (cudaError_t(err), None) + return (cudaError_t(err), desc) {{endif}} {{if 'cudaCreateChannelDesc' in found_functions}} @@ -30642,8 +31852,8 @@ def cudaCreateTextureObject(pResDesc : Optional[cudaResourceDesc], pTexDesc : Op with nogil: err = cyruntime.cudaCreateTextureObject(pTexObject._pvt_ptr, cypResDesc_ptr, cypTexDesc_ptr, cypResViewDesc_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pTexObject) + return (cudaError_t(err), None) + return (cudaError_t(err), pTexObject) {{endif}} {{if 'cudaDestroyTextureObject' in found_functions}} @@ -30678,7 +31888,7 @@ def cudaDestroyTextureObject(texObject): cytexObject = ptexObject with nogil: err = cyruntime.cudaDestroyTextureObject(cytexObject) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGetTextureObjectResourceDesc' in found_functions}} @@ -30718,8 +31928,8 @@ def cudaGetTextureObjectResourceDesc(texObject): with nogil: err = cyruntime.cudaGetTextureObjectResourceDesc(pResDesc._pvt_ptr, cytexObject) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pResDesc) + return (cudaError_t(err), None) + return (cudaError_t(err), pResDesc) {{endif}} {{if 'cudaGetTextureObjectTextureDesc' in found_functions}} @@ -30759,8 +31969,8 @@ def cudaGetTextureObjectTextureDesc(texObject): with nogil: err = cyruntime.cudaGetTextureObjectTextureDesc(pTexDesc._pvt_ptr, cytexObject) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pTexDesc) + return (cudaError_t(err), None) + return (cudaError_t(err), pTexDesc) {{endif}} {{if 'cudaGetTextureObjectResourceViewDesc' in found_functions}} @@ -30801,8 +32011,8 @@ def cudaGetTextureObjectResourceViewDesc(texObject): with nogil: err = cyruntime.cudaGetTextureObjectResourceViewDesc(pResViewDesc._pvt_ptr, cytexObject) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pResViewDesc) + return (cudaError_t(err), None) + return (cudaError_t(err), pResViewDesc) {{endif}} {{if 'cudaCreateSurfaceObject' in found_functions}} @@ -30843,8 +32053,8 @@ def cudaCreateSurfaceObject(pResDesc : Optional[cudaResourceDesc]): with nogil: err = cyruntime.cudaCreateSurfaceObject(pSurfObject._pvt_ptr, cypResDesc_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pSurfObject) + return (cudaError_t(err), None) + return (cudaError_t(err), pSurfObject) {{endif}} {{if 'cudaDestroySurfaceObject' in found_functions}} @@ -30879,7 +32089,7 @@ def cudaDestroySurfaceObject(surfObject): cysurfObject = psurfObject with nogil: err = cyruntime.cudaDestroySurfaceObject(cysurfObject) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGetSurfaceObjectResourceDesc' in found_functions}} @@ -30916,8 +32126,8 @@ def cudaGetSurfaceObjectResourceDesc(surfObject): with nogil: err = cyruntime.cudaGetSurfaceObjectResourceDesc(pResDesc._pvt_ptr, cysurfObject) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pResDesc) + return (cudaError_t(err), None) + return (cudaError_t(err), pResDesc) {{endif}} {{if 'cudaDriverGetVersion' in found_functions}} @@ -30949,8 +32159,8 @@ def cudaDriverGetVersion(): with nogil: err = cyruntime.cudaDriverGetVersion(&driverVersion) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], driverVersion) + return (cudaError_t(err), None) + return (cudaError_t(err), driverVersion) {{endif}} {{if 'cudaRuntimeGetVersion' in found_functions}} @@ -30985,8 +32195,8 @@ def cudaRuntimeGetVersion(): with nogil: err = cyruntime.cudaRuntimeGetVersion(&runtimeVersion) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], runtimeVersion) + return (cudaError_t(err), None) + return (cudaError_t(err), runtimeVersion) {{endif}} {{if 'cudaLogsRegisterCallback' in found_functions}} @@ -31025,8 +32235,8 @@ def cudaLogsRegisterCallback(callbackFunc, userData): with nogil: err = cyruntime.cudaLogsRegisterCallback(cycallbackFunc, cyuserData_ptr, callback_out._pvt_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], callback_out) + return (cudaError_t(err), None) + return (cudaError_t(err), callback_out) {{endif}} {{if 'cudaLogsUnregisterCallback' in found_functions}} @@ -31055,7 +32265,7 @@ def cudaLogsUnregisterCallback(callback): cycallback = pcallback with nogil: err = cyruntime.cudaLogsUnregisterCallback(cycallback) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaLogsCurrent' in found_functions}} @@ -31080,8 +32290,8 @@ def cudaLogsCurrent(unsigned int flags): with nogil: err = cyruntime.cudaLogsCurrent(iterator_out._pvt_ptr, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], iterator_out) + return (cudaError_t(err), None) + return (cudaError_t(err), iterator_out) {{endif}} {{if 'cudaLogsDumpToFile' in found_functions}} @@ -31124,8 +32334,8 @@ def cudaLogsDumpToFile(iterator : Optional[cudaLogIterator], char* pathToFile, u with nogil: err = cyruntime.cudaLogsDumpToFile(cyiterator, pathToFile, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], iterator) + return (cudaError_t(err), None) + return (cudaError_t(err), iterator) {{endif}} {{if 'cudaLogsDumpToMemory' in found_functions}} @@ -31182,8 +32392,8 @@ def cudaLogsDumpToMemory(iterator : Optional[cudaLogIterator], char* buffer, siz with nogil: err = cyruntime.cudaLogsDumpToMemory(cyiterator, buffer, &size, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None, None) - return (_dict_cudaError_t[err], iterator, size) + return (cudaError_t(err), None, None) + return (cudaError_t(err), iterator, size) {{endif}} {{if 'cudaGraphCreate' in found_functions}} @@ -31214,8 +32424,8 @@ def cudaGraphCreate(unsigned int flags): with nogil: err = cyruntime.cudaGraphCreate(pGraph._pvt_ptr, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pGraph) + return (cudaError_t(err), None) + return (cudaError_t(err), pGraph) {{endif}} {{if 'cudaGraphAddKernelNode' in found_functions}} @@ -31336,8 +32546,8 @@ def cudaGraphAddKernelNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t if len(pDependencies) > 1 and cypDependencies is not NULL: free(cypDependencies) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pGraphNode) + return (cudaError_t(err), None) + return (cudaError_t(err), pGraphNode) {{endif}} {{if 'cudaGraphKernelNodeGetParams' in found_functions}} @@ -31385,8 +32595,8 @@ def cudaGraphKernelNodeGetParams(node): with nogil: err = cyruntime.cudaGraphKernelNodeGetParams(cynode, pNodeParams._pvt_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pNodeParams) + return (cudaError_t(err), None) + return (cudaError_t(err), pNodeParams) {{endif}} {{if 'cudaGraphKernelNodeSetParams' in found_functions}} @@ -31424,7 +32634,7 @@ def cudaGraphKernelNodeSetParams(node, pNodeParams : Optional[cudaKernelNodePara cdef cyruntime.cudaKernelNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphKernelNodeSetParams(cynode, cypNodeParams_ptr) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphKernelNodeCopyAttributes' in found_functions}} @@ -31471,7 +32681,7 @@ def cudaGraphKernelNodeCopyAttributes(hDst, hSrc): cyhDst = phDst with nogil: err = cyruntime.cudaGraphKernelNodeCopyAttributes(cyhDst, cyhSrc) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphKernelNodeGetAttribute' in found_functions}} @@ -31514,8 +32724,8 @@ def cudaGraphKernelNodeGetAttribute(hNode, attr not None : cudaKernelNodeAttrID) with nogil: err = cyruntime.cudaGraphKernelNodeGetAttribute(cyhNode, cyattr, value_out._pvt_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], value_out) + return (cudaError_t(err), None) + return (cudaError_t(err), value_out) {{endif}} {{if 'cudaGraphKernelNodeSetAttribute' in found_functions}} @@ -31557,7 +32767,7 @@ def cudaGraphKernelNodeSetAttribute(hNode, attr not None : cudaKernelNodeAttrID, cdef cyruntime.cudaKernelNodeAttrValue* cyvalue_ptr = value._pvt_ptr if value is not None else NULL with nogil: err = cyruntime.cudaGraphKernelNodeSetAttribute(cyhNode, cyattr, cyvalue_ptr) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphAddMemcpyNode' in found_functions}} @@ -31632,8 +32842,8 @@ def cudaGraphAddMemcpyNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t if len(pDependencies) > 1 and cypDependencies is not NULL: free(cypDependencies) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pGraphNode) + return (cudaError_t(err), None) + return (cudaError_t(err), pGraphNode) {{endif}} {{if 'cudaGraphAddMemcpyNode1D' in found_functions}} @@ -31727,8 +32937,8 @@ def cudaGraphAddMemcpyNode1D(graph, pDependencies : Optional[tuple[cudaGraphNode if len(pDependencies) > 1 and cypDependencies is not NULL: free(cypDependencies) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pGraphNode) + return (cudaError_t(err), None) + return (cudaError_t(err), pGraphNode) {{endif}} {{if 'cudaGraphMemcpyNodeGetParams' in found_functions}} @@ -31767,8 +32977,8 @@ def cudaGraphMemcpyNodeGetParams(node): with nogil: err = cyruntime.cudaGraphMemcpyNodeGetParams(cynode, pNodeParams._pvt_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pNodeParams) + return (cudaError_t(err), None) + return (cudaError_t(err), pNodeParams) {{endif}} {{if 'cudaGraphMemcpyNodeSetParams' in found_functions}} @@ -31806,7 +33016,7 @@ def cudaGraphMemcpyNodeSetParams(node, pNodeParams : Optional[cudaMemcpy3DParms] cdef cyruntime.cudaMemcpy3DParms* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphMemcpyNodeSetParams(cynode, cypNodeParams_ptr) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphMemcpyNodeSetParams1D' in found_functions}} @@ -31868,7 +33078,7 @@ def cudaGraphMemcpyNodeSetParams1D(node, dst, src, size_t count, kind not None : cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaGraphMemcpyNodeSetParams1D(cynode, cydst_ptr, cysrc_ptr, count, cykind) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphAddMemsetNode' in found_functions}} @@ -31937,8 +33147,8 @@ def cudaGraphAddMemsetNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t if len(pDependencies) > 1 and cypDependencies is not NULL: free(cypDependencies) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pGraphNode) + return (cudaError_t(err), None) + return (cudaError_t(err), pGraphNode) {{endif}} {{if 'cudaGraphMemsetNodeGetParams' in found_functions}} @@ -31977,8 +33187,8 @@ def cudaGraphMemsetNodeGetParams(node): with nogil: err = cyruntime.cudaGraphMemsetNodeGetParams(cynode, pNodeParams._pvt_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pNodeParams) + return (cudaError_t(err), None) + return (cudaError_t(err), pNodeParams) {{endif}} {{if 'cudaGraphMemsetNodeSetParams' in found_functions}} @@ -32016,7 +33226,7 @@ def cudaGraphMemsetNodeSetParams(node, pNodeParams : Optional[cudaMemsetParams]) cdef cyruntime.cudaMemsetParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphMemsetNodeSetParams(cynode, cypNodeParams_ptr) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphAddHostNode' in found_functions}} @@ -32086,8 +33296,8 @@ def cudaGraphAddHostNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t] if len(pDependencies) > 1 and cypDependencies is not NULL: free(cypDependencies) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pGraphNode) + return (cudaError_t(err), None) + return (cudaError_t(err), pGraphNode) {{endif}} {{if 'cudaGraphHostNodeGetParams' in found_functions}} @@ -32126,8 +33336,8 @@ def cudaGraphHostNodeGetParams(node): with nogil: err = cyruntime.cudaGraphHostNodeGetParams(cynode, pNodeParams._pvt_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pNodeParams) + return (cudaError_t(err), None) + return (cudaError_t(err), pNodeParams) {{endif}} {{if 'cudaGraphHostNodeSetParams' in found_functions}} @@ -32165,7 +33375,7 @@ def cudaGraphHostNodeSetParams(node, pNodeParams : Optional[cudaHostNodeParams]) cdef cyruntime.cudaHostNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphHostNodeSetParams(cynode, cypNodeParams_ptr) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphAddChildGraphNode' in found_functions}} @@ -32245,8 +33455,8 @@ def cudaGraphAddChildGraphNode(graph, pDependencies : Optional[tuple[cudaGraphNo if len(pDependencies) > 1 and cypDependencies is not NULL: free(cypDependencies) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pGraphNode) + return (cudaError_t(err), None) + return (cudaError_t(err), pGraphNode) {{endif}} {{if 'cudaGraphChildGraphNodeGetGraph' in found_functions}} @@ -32290,8 +33500,8 @@ def cudaGraphChildGraphNodeGetGraph(node): with nogil: err = cyruntime.cudaGraphChildGraphNodeGetGraph(cynode, pGraph._pvt_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pGraph) + return (cudaError_t(err), None) + return (cudaError_t(err), pGraph) {{endif}} {{if 'cudaGraphAddEmptyNode' in found_functions}} @@ -32361,8 +33571,8 @@ def cudaGraphAddEmptyNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t] if len(pDependencies) > 1 and cypDependencies is not NULL: free(cypDependencies) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pGraphNode) + return (cudaError_t(err), None) + return (cudaError_t(err), pGraphNode) {{endif}} {{if 'cudaGraphAddEventRecordNode' in found_functions}} @@ -32441,8 +33651,8 @@ def cudaGraphAddEventRecordNode(graph, pDependencies : Optional[tuple[cudaGraphN if len(pDependencies) > 1 and cypDependencies is not NULL: free(cypDependencies) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pGraphNode) + return (cudaError_t(err), None) + return (cudaError_t(err), pGraphNode) {{endif}} {{if 'cudaGraphEventRecordNodeGetEvent' in found_functions}} @@ -32481,8 +33691,8 @@ def cudaGraphEventRecordNodeGetEvent(node): with nogil: err = cyruntime.cudaGraphEventRecordNodeGetEvent(cynode, event_out._pvt_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], event_out) + return (cudaError_t(err), None) + return (cudaError_t(err), event_out) {{endif}} {{if 'cudaGraphEventRecordNodeSetEvent' in found_functions}} @@ -32527,7 +33737,7 @@ def cudaGraphEventRecordNodeSetEvent(node, event): cynode = pnode with nogil: err = cyruntime.cudaGraphEventRecordNodeSetEvent(cynode, cyevent) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphAddEventWaitNode' in found_functions}} @@ -32609,8 +33819,8 @@ def cudaGraphAddEventWaitNode(graph, pDependencies : Optional[tuple[cudaGraphNod if len(pDependencies) > 1 and cypDependencies is not NULL: free(cypDependencies) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pGraphNode) + return (cudaError_t(err), None) + return (cudaError_t(err), pGraphNode) {{endif}} {{if 'cudaGraphEventWaitNodeGetEvent' in found_functions}} @@ -32649,8 +33859,8 @@ def cudaGraphEventWaitNodeGetEvent(node): with nogil: err = cyruntime.cudaGraphEventWaitNodeGetEvent(cynode, event_out._pvt_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], event_out) + return (cudaError_t(err), None) + return (cudaError_t(err), event_out) {{endif}} {{if 'cudaGraphEventWaitNodeSetEvent' in found_functions}} @@ -32695,7 +33905,7 @@ def cudaGraphEventWaitNodeSetEvent(node, event): cynode = pnode with nogil: err = cyruntime.cudaGraphEventWaitNodeSetEvent(cynode, cyevent) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphAddExternalSemaphoresSignalNode' in found_functions}} @@ -32766,8 +33976,8 @@ def cudaGraphAddExternalSemaphoresSignalNode(graph, pDependencies : Optional[tup if len(pDependencies) > 1 and cypDependencies is not NULL: free(cypDependencies) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pGraphNode) + return (cudaError_t(err), None) + return (cudaError_t(err), pGraphNode) {{endif}} {{if 'cudaGraphExternalSemaphoresSignalNodeGetParams' in found_functions}} @@ -32812,8 +34022,8 @@ def cudaGraphExternalSemaphoresSignalNodeGetParams(hNode): with nogil: err = cyruntime.cudaGraphExternalSemaphoresSignalNodeGetParams(cyhNode, params_out._pvt_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], params_out) + return (cudaError_t(err), None) + return (cudaError_t(err), params_out) {{endif}} {{if 'cudaGraphExternalSemaphoresSignalNodeSetParams' in found_functions}} @@ -32852,7 +34062,7 @@ def cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams : Optional[ cdef cyruntime.cudaExternalSemaphoreSignalNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphExternalSemaphoresSignalNodeSetParams(cyhNode, cynodeParams_ptr) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphAddExternalSemaphoresWaitNode' in found_functions}} @@ -32923,8 +34133,8 @@ def cudaGraphAddExternalSemaphoresWaitNode(graph, pDependencies : Optional[tuple if len(pDependencies) > 1 and cypDependencies is not NULL: free(cypDependencies) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pGraphNode) + return (cudaError_t(err), None) + return (cudaError_t(err), pGraphNode) {{endif}} {{if 'cudaGraphExternalSemaphoresWaitNodeGetParams' in found_functions}} @@ -32969,8 +34179,8 @@ def cudaGraphExternalSemaphoresWaitNodeGetParams(hNode): with nogil: err = cyruntime.cudaGraphExternalSemaphoresWaitNodeGetParams(cyhNode, params_out._pvt_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], params_out) + return (cudaError_t(err), None) + return (cudaError_t(err), params_out) {{endif}} {{if 'cudaGraphExternalSemaphoresWaitNodeSetParams' in found_functions}} @@ -33009,7 +34219,7 @@ def cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams : Optional[cu cdef cyruntime.cudaExternalSemaphoreWaitNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphExternalSemaphoresWaitNodeSetParams(cyhNode, cynodeParams_ptr) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphAddMemAllocNode' in found_functions}} @@ -33119,8 +34329,8 @@ def cudaGraphAddMemAllocNode(graph, pDependencies : Optional[tuple[cudaGraphNode if len(pDependencies) > 1 and cypDependencies is not NULL: free(cypDependencies) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pGraphNode) + return (cudaError_t(err), None) + return (cudaError_t(err), pGraphNode) {{endif}} {{if 'cudaGraphMemAllocNodeGetParams' in found_functions}} @@ -33162,8 +34372,8 @@ def cudaGraphMemAllocNodeGetParams(node): with nogil: err = cyruntime.cudaGraphMemAllocNodeGetParams(cynode, params_out._pvt_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], params_out) + return (cudaError_t(err), None) + return (cudaError_t(err), params_out) {{endif}} {{if 'cudaGraphAddMemFreeNode' in found_functions}} @@ -33252,8 +34462,8 @@ def cudaGraphAddMemFreeNode(graph, pDependencies : Optional[tuple[cudaGraphNode_ if len(pDependencies) > 1 and cypDependencies is not NULL: free(cypDependencies) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pGraphNode) + return (cudaError_t(err), None) + return (cudaError_t(err), pGraphNode) {{endif}} {{if 'cudaGraphMemFreeNodeGetParams' in found_functions}} @@ -33293,8 +34503,8 @@ def cudaGraphMemFreeNodeGetParams(node): with nogil: err = cyruntime.cudaGraphMemFreeNodeGetParams(cynode, cydptr_out_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], dptr_out) + return (cudaError_t(err), None) + return (cudaError_t(err), dptr_out) {{endif}} {{if 'cudaDeviceGraphMemTrim' in found_functions}} @@ -33323,7 +34533,7 @@ def cudaDeviceGraphMemTrim(int device): """ with nogil: err = cyruntime.cudaDeviceGraphMemTrim(device) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaDeviceGetGraphMemAttribute' in found_functions}} @@ -33373,8 +34583,8 @@ def cudaDeviceGetGraphMemAttribute(int device, attr not None : cudaGraphMemAttri with nogil: err = cyruntime.cudaDeviceGetGraphMemAttribute(device, cyattr, cyvalue_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], cyvalue.pyObj()) + return (cudaError_t(err), None) + return (cudaError_t(err), cyvalue.pyObj()) {{endif}} {{if 'cudaDeviceSetGraphMemAttribute' in found_functions}} @@ -33416,7 +34626,7 @@ def cudaDeviceSetGraphMemAttribute(int device, attr not None : cudaGraphMemAttri cdef void* cyvalue_ptr = cyvalue.cptr with nogil: err = cyruntime.cudaDeviceSetGraphMemAttribute(device, cyattr, cyvalue_ptr) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphClone' in found_functions}} @@ -33465,8 +34675,8 @@ def cudaGraphClone(originalGraph): with nogil: err = cyruntime.cudaGraphClone(pGraphClone._pvt_ptr, cyoriginalGraph) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pGraphClone) + return (cudaError_t(err), None) + return (cudaError_t(err), pGraphClone) {{endif}} {{if 'cudaGraphNodeFindInClone' in found_functions}} @@ -33522,8 +34732,8 @@ def cudaGraphNodeFindInClone(originalNode, clonedGraph): with nogil: err = cyruntime.cudaGraphNodeFindInClone(pNode._pvt_ptr, cyoriginalNode, cyclonedGraph) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pNode) + return (cudaError_t(err), None) + return (cudaError_t(err), pNode) {{endif}} {{if 'cudaGraphNodeGetType' in found_functions}} @@ -33562,8 +34772,8 @@ def cudaGraphNodeGetType(node): with nogil: err = cyruntime.cudaGraphNodeGetType(cynode, &pType) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], cudaGraphNodeType(pType)) + return (cudaError_t(err), None) + return (cudaError_t(err), cudaGraphNodeType(pType)) {{endif}} {{if 'cudaGraphNodeGetContainingGraph' in found_functions}} @@ -33603,8 +34813,8 @@ def cudaGraphNodeGetContainingGraph(hNode): with nogil: err = cyruntime.cudaGraphNodeGetContainingGraph(cyhNode, phGraph._pvt_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], phGraph) + return (cudaError_t(err), None) + return (cudaError_t(err), phGraph) {{endif}} {{if 'cudaGraphNodeGetLocalId' in found_functions}} @@ -33645,8 +34855,8 @@ def cudaGraphNodeGetLocalId(hNode): with nogil: err = cyruntime.cudaGraphNodeGetLocalId(cyhNode, &nodeId) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], nodeId) + return (cudaError_t(err), None) + return (cudaError_t(err), nodeId) {{endif}} {{if 'cudaGraphNodeGetToolsId' in found_functions}} @@ -33683,8 +34893,8 @@ def cudaGraphNodeGetToolsId(hNode): with nogil: err = cyruntime.cudaGraphNodeGetToolsId(cyhNode, &toolsNodeId) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], toolsNodeId) + return (cudaError_t(err), None) + return (cudaError_t(err), toolsNodeId) {{endif}} {{if 'cudaGraphGetId' in found_functions}} @@ -33724,8 +34934,8 @@ def cudaGraphGetId(hGraph): with nogil: err = cyruntime.cudaGraphGetId(cyhGraph, &graphID) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], graphID) + return (cudaError_t(err), None) + return (cudaError_t(err), graphID) {{endif}} {{if 'cudaGraphExecGetId' in found_functions}} @@ -33765,8 +34975,8 @@ def cudaGraphExecGetId(hGraphExec): with nogil: err = cyruntime.cudaGraphExecGetId(cyhGraphExec, &graphID) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], graphID) + return (cudaError_t(err), None) + return (cudaError_t(err), graphID) {{endif}} {{if 'cudaGraphGetNodes' in found_functions}} @@ -33824,8 +35034,8 @@ def cudaGraphGetNodes(graph, size_t numNodes = 0): if cynodes is not NULL: free(cynodes) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None, None) - return (_dict_cudaError_t[err], pynodes, numNodes) + return (cudaError_t(err), None, None) + return (cudaError_t(err), pynodes, numNodes) {{endif}} {{if 'cudaGraphGetRootNodes' in found_functions}} @@ -33883,8 +35093,8 @@ def cudaGraphGetRootNodes(graph, size_t pNumRootNodes = 0): if cypRootNodes is not NULL: free(cypRootNodes) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None, None) - return (_dict_cudaError_t[err], pypRootNodes, pNumRootNodes) + return (cudaError_t(err), None, None) + return (cudaError_t(err), pypRootNodes, pNumRootNodes) {{endif}} {{if 'cudaGraphGetEdges' in found_functions}} @@ -33973,8 +35183,8 @@ def cudaGraphGetEdges(graph, size_t numEdges = 0): if cyedgeData is not NULL: free(cyedgeData) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None, None, None, None) - return (_dict_cudaError_t[err], pyfrom_, pyto, pyedgeData, numEdges) + return (cudaError_t(err), None, None, None, None) + return (cudaError_t(err), pyfrom_, pyto, pyedgeData, numEdges) {{endif}} {{if 'cudaGraphNodeGetDependencies' in found_functions}} @@ -34050,8 +35260,8 @@ def cudaGraphNodeGetDependencies(node, size_t pNumDependencies = 0): if cyedgeData is not NULL: free(cyedgeData) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None, None, None) - return (_dict_cudaError_t[err], pypDependencies, pyedgeData, pNumDependencies) + return (cudaError_t(err), None, None, None) + return (cudaError_t(err), pypDependencies, pyedgeData, pNumDependencies) {{endif}} {{if 'cudaGraphNodeGetDependentNodes' in found_functions}} @@ -34127,8 +35337,8 @@ def cudaGraphNodeGetDependentNodes(node, size_t pNumDependentNodes = 0): if cyedgeData is not NULL: free(cyedgeData) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None, None, None) - return (_dict_cudaError_t[err], pypDependentNodes, pyedgeData, pNumDependentNodes) + return (cudaError_t(err), None, None, None) + return (cudaError_t(err), pypDependentNodes, pyedgeData, pNumDependentNodes) {{endif}} {{if 'cudaGraphAddDependencies' in found_functions}} @@ -34221,7 +35431,7 @@ def cudaGraphAddDependencies(graph, from_ : Optional[tuple[cudaGraphNode_t] | li free(cyto) if len(edgeData) > 1 and cyedgeData is not NULL: free(cyedgeData) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphRemoveDependencies' in found_functions}} @@ -34317,7 +35527,7 @@ def cudaGraphRemoveDependencies(graph, from_ : Optional[tuple[cudaGraphNode_t] | free(cyto) if len(edgeData) > 1 and cyedgeData is not NULL: free(cyedgeData) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphDestroyNode' in found_functions}} @@ -34356,7 +35566,7 @@ def cudaGraphDestroyNode(node): cynode = pnode with nogil: err = cyruntime.cudaGraphDestroyNode(cynode) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphInstantiate' in found_functions}} @@ -34459,8 +35669,8 @@ def cudaGraphInstantiate(graph, unsigned long long flags): with nogil: err = cyruntime.cudaGraphInstantiate(pGraphExec._pvt_ptr, cygraph, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pGraphExec) + return (cudaError_t(err), None) + return (cudaError_t(err), pGraphExec) {{endif}} {{if 'cudaGraphInstantiateWithFlags' in found_functions}} @@ -34565,8 +35775,8 @@ def cudaGraphInstantiateWithFlags(graph, unsigned long long flags): with nogil: err = cyruntime.cudaGraphInstantiateWithFlags(pGraphExec._pvt_ptr, cygraph, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pGraphExec) + return (cudaError_t(err), None) + return (cudaError_t(err), pGraphExec) {{endif}} {{if 'cudaGraphInstantiateWithParams' in found_functions}} @@ -34712,8 +35922,8 @@ def cudaGraphInstantiateWithParams(graph, instantiateParams : Optional[cudaGraph with nogil: err = cyruntime.cudaGraphInstantiateWithParams(pGraphExec._pvt_ptr, cygraph, cyinstantiateParams_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pGraphExec) + return (cudaError_t(err), None) + return (cudaError_t(err), pGraphExec) {{endif}} {{if 'cudaGraphExecGetFlags' in found_functions}} @@ -34755,8 +35965,8 @@ def cudaGraphExecGetFlags(graphExec): with nogil: err = cyruntime.cudaGraphExecGetFlags(cygraphExec, &flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], flags) + return (cudaError_t(err), None) + return (cudaError_t(err), flags) {{endif}} {{if 'cudaGraphExecKernelNodeSetParams' in found_functions}} @@ -34838,7 +36048,7 @@ def cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams : Optional[cu cdef cyruntime.cudaKernelNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphExecKernelNodeSetParams(cyhGraphExec, cynode, cypNodeParams_ptr) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphExecMemcpyNodeSetParams' in found_functions}} @@ -34903,7 +36113,7 @@ def cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams : Optional[cu cdef cyruntime.cudaMemcpy3DParms* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphExecMemcpyNodeSetParams(cyhGraphExec, cynode, cypNodeParams_ptr) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphExecMemcpyNodeSetParams1D' in found_functions}} @@ -34976,7 +36186,7 @@ def cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, size_t count, cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaGraphExecMemcpyNodeSetParams1D(cyhGraphExec, cynode, cydst_ptr, cysrc_ptr, count, cykind) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphExecMemsetNodeSetParams' in found_functions}} @@ -35046,7 +36256,7 @@ def cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams : Optional[cu cdef cyruntime.cudaMemsetParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphExecMemsetNodeSetParams(cyhGraphExec, cynode, cypNodeParams_ptr) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphExecHostNodeSetParams' in found_functions}} @@ -35101,7 +36311,7 @@ def cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams : Optional[cuda cdef cyruntime.cudaHostNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphExecHostNodeSetParams(cyhGraphExec, cynode, cypNodeParams_ptr) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphExecChildGraphNodeSetParams' in found_functions}} @@ -35171,7 +36381,7 @@ def cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph): cyhGraphExec = phGraphExec with nogil: err = cyruntime.cudaGraphExecChildGraphNodeSetParams(cyhGraphExec, cynode, cychildGraph) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphExecEventRecordNodeSetEvent' in found_functions}} @@ -35234,7 +36444,7 @@ def cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event): cyhGraphExec = phGraphExec with nogil: err = cyruntime.cudaGraphExecEventRecordNodeSetEvent(cyhGraphExec, cyhNode, cyevent) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphExecEventWaitNodeSetEvent' in found_functions}} @@ -35297,7 +36507,7 @@ def cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event): cyhGraphExec = phGraphExec with nogil: err = cyruntime.cudaGraphExecEventWaitNodeSetEvent(cyhGraphExec, cyhNode, cyevent) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphExecExternalSemaphoresSignalNodeSetParams' in found_functions}} @@ -35357,7 +36567,7 @@ def cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodePa cdef cyruntime.cudaExternalSemaphoreSignalNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphExecExternalSemaphoresSignalNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphExecExternalSemaphoresWaitNodeSetParams' in found_functions}} @@ -35417,7 +36627,7 @@ def cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodePara cdef cyruntime.cudaExternalSemaphoreWaitNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphExecExternalSemaphoresWaitNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphNodeSetEnabled' in found_functions}} @@ -35480,7 +36690,7 @@ def cudaGraphNodeSetEnabled(hGraphExec, hNode, unsigned int isEnabled): cyhGraphExec = phGraphExec with nogil: err = cyruntime.cudaGraphNodeSetEnabled(cyhGraphExec, cyhNode, isEnabled) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphNodeGetEnabled' in found_functions}} @@ -35538,8 +36748,8 @@ def cudaGraphNodeGetEnabled(hGraphExec, hNode): with nogil: err = cyruntime.cudaGraphNodeGetEnabled(cyhGraphExec, cyhNode, &isEnabled) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], isEnabled) + return (cudaError_t(err), None) + return (cudaError_t(err), isEnabled) {{endif}} {{if 'cudaGraphExecUpdate' in found_functions}} @@ -35714,8 +36924,8 @@ def cudaGraphExecUpdate(hGraphExec, hGraph): with nogil: err = cyruntime.cudaGraphExecUpdate(cyhGraphExec, cyhGraph, resultInfo._pvt_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], resultInfo) + return (cudaError_t(err), None) + return (cudaError_t(err), resultInfo) {{endif}} {{if 'cudaGraphUpload' in found_functions}} @@ -35764,7 +36974,7 @@ def cudaGraphUpload(graphExec, stream): cygraphExec = pgraphExec with nogil: err = cyruntime.cudaGraphUpload(cygraphExec, cystream) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphLaunch' in found_functions}} @@ -35818,7 +37028,7 @@ def cudaGraphLaunch(graphExec, stream): cygraphExec = pgraphExec with nogil: err = cyruntime.cudaGraphLaunch(cygraphExec, cystream) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphExecDestroy' in found_functions}} @@ -35853,7 +37063,7 @@ def cudaGraphExecDestroy(graphExec): cygraphExec = pgraphExec with nogil: err = cyruntime.cudaGraphExecDestroy(cygraphExec) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphDestroy' in found_functions}} @@ -35888,7 +37098,7 @@ def cudaGraphDestroy(graph): cygraph = pgraph with nogil: err = cyruntime.cudaGraphDestroy(cygraph) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphDebugDotPrint' in found_functions}} @@ -35928,7 +37138,7 @@ def cudaGraphDebugDotPrint(graph, char* path, unsigned int flags): cygraph = pgraph with nogil: err = cyruntime.cudaGraphDebugDotPrint(cygraph, path, flags) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaUserObjectCreate' in found_functions}} @@ -35989,8 +37199,8 @@ def cudaUserObjectCreate(ptr, destroy, unsigned int initialRefcount, unsigned in with nogil: err = cyruntime.cudaUserObjectCreate(object_out._pvt_ptr, cyptr_ptr, cydestroy, initialRefcount, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], object_out) + return (cudaError_t(err), None) + return (cudaError_t(err), object_out) {{endif}} {{if 'cudaUserObjectRetain' in found_functions}} @@ -36032,7 +37242,7 @@ def cudaUserObjectRetain(object, unsigned int count): cyobject = pobject with nogil: err = cyruntime.cudaUserObjectRetain(cyobject, count) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaUserObjectRelease' in found_functions}} @@ -36077,7 +37287,7 @@ def cudaUserObjectRelease(object, unsigned int count): cyobject = pobject with nogil: err = cyruntime.cudaUserObjectRelease(cyobject, count) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphRetainUserObject' in found_functions}} @@ -36133,7 +37343,7 @@ def cudaGraphRetainUserObject(graph, object, unsigned int count, unsigned int fl cygraph = pgraph with nogil: err = cyruntime.cudaGraphRetainUserObject(cygraph, cyobject, count, flags) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphReleaseUserObject' in found_functions}} @@ -36184,7 +37394,7 @@ def cudaGraphReleaseUserObject(graph, object, unsigned int count): cygraph = pgraph with nogil: err = cyruntime.cudaGraphReleaseUserObject(cygraph, cyobject, count) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphAddNode' in found_functions}} @@ -36279,8 +37489,8 @@ def cudaGraphAddNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t] | li if len(dependencyData) > 1 and cydependencyData is not NULL: free(cydependencyData) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pGraphNode) + return (cudaError_t(err), None) + return (cudaError_t(err), pGraphNode) {{endif}} {{if 'cudaGraphNodeSetParams' in found_functions}} @@ -36324,7 +37534,7 @@ def cudaGraphNodeSetParams(node, nodeParams : Optional[cudaGraphNodeParams]): cdef cyruntime.cudaGraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphNodeSetParams(cynode, cynodeParams_ptr) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphExecNodeSetParams' in found_functions}} @@ -36384,7 +37594,7 @@ def cudaGraphExecNodeSetParams(graphExec, node, nodeParams : Optional[cudaGraphN cdef cyruntime.cudaGraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphExecNodeSetParams(cygraphExec, cynode, cynodeParams_ptr) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaGraphConditionalHandleCreate' in found_functions}} @@ -36435,8 +37645,8 @@ def cudaGraphConditionalHandleCreate(graph, unsigned int defaultLaunchValue, uns with nogil: err = cyruntime.cudaGraphConditionalHandleCreate(pHandle_out._pvt_ptr, cygraph, defaultLaunchValue, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pHandle_out) + return (cudaError_t(err), None) + return (cudaError_t(err), pHandle_out) {{endif}} {{if 'cudaGraphConditionalHandleCreate_v2' in found_functions}} @@ -36498,8 +37708,8 @@ def cudaGraphConditionalHandleCreate_v2(graph, ctx, unsigned int defaultLaunchVa with nogil: err = cyruntime.cudaGraphConditionalHandleCreate_v2(pHandle_out._pvt_ptr, cygraph, cyctx, defaultLaunchValue, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pHandle_out) + return (cudaError_t(err), None) + return (cudaError_t(err), pHandle_out) {{endif}} {{if 'cudaGetDriverEntryPoint' in found_functions}} @@ -36602,8 +37812,8 @@ def cudaGetDriverEntryPoint(char* symbol, unsigned long long flags): with nogil: err = cyruntime.cudaGetDriverEntryPoint(symbol, &funcPtr, flags, &driverStatus) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None, None) - return (_dict_cudaError_t[err], funcPtr, cudaDriverEntryPointQueryResult(driverStatus)) + return (cudaError_t(err), None, None) + return (cudaError_t(err), funcPtr, cudaDriverEntryPointQueryResult(driverStatus)) {{endif}} {{if 'cudaGetDriverEntryPointByVersion' in found_functions}} @@ -36710,8 +37920,8 @@ def cudaGetDriverEntryPointByVersion(char* symbol, unsigned int cudaVersion, uns with nogil: err = cyruntime.cudaGetDriverEntryPointByVersion(symbol, &funcPtr, cudaVersion, flags, &driverStatus) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None, None) - return (_dict_cudaError_t[err], funcPtr, cudaDriverEntryPointQueryResult(driverStatus)) + return (cudaError_t(err), None, None) + return (cudaError_t(err), funcPtr, cudaDriverEntryPointQueryResult(driverStatus)) {{endif}} {{if 'cudaLibraryLoadData' in found_functions}} @@ -36809,8 +38019,8 @@ def cudaLibraryLoadData(code, jitOptions : Optional[tuple[cudaJitOption] | list[ with nogil: err = cyruntime.cudaLibraryLoadData(library._pvt_ptr, cycode_ptr, cyjitOptions.data(), cyjitOptionsValues_ptr, numJitOptions, cylibraryOptions.data(), cylibraryOptionValues_ptr, numLibraryOptions) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], library) + return (cudaError_t(err), None) + return (cudaError_t(err), library) {{endif}} {{if 'cudaLibraryLoadFromFile' in found_functions}} @@ -36907,8 +38117,8 @@ def cudaLibraryLoadFromFile(char* fileName, jitOptions : Optional[tuple[cudaJitO with nogil: err = cyruntime.cudaLibraryLoadFromFile(library._pvt_ptr, fileName, cyjitOptions.data(), cyjitOptionsValues_ptr, numJitOptions, cylibraryOptions.data(), cylibraryOptionValues_ptr, numLibraryOptions) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], library) + return (cudaError_t(err), None) + return (cudaError_t(err), library) {{endif}} {{if 'cudaLibraryUnload' in found_functions}} @@ -36943,7 +38153,7 @@ def cudaLibraryUnload(library): cylibrary = plibrary with nogil: err = cyruntime.cudaLibraryUnload(cylibrary) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaLibraryGetKernel' in found_functions}} @@ -36986,8 +38196,8 @@ def cudaLibraryGetKernel(library, char* name): with nogil: err = cyruntime.cudaLibraryGetKernel(pKernel._pvt_ptr, cylibrary, name) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pKernel) + return (cudaError_t(err), None) + return (cudaError_t(err), pKernel) {{endif}} {{if 'cudaLibraryGetGlobal' in found_functions}} @@ -37038,8 +38248,8 @@ def cudaLibraryGetGlobal(library, char* name): with nogil: err = cyruntime.cudaLibraryGetGlobal(&dptr, &numbytes, cylibrary, name) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None, None) - return (_dict_cudaError_t[err], dptr, numbytes) + return (cudaError_t(err), None, None) + return (cudaError_t(err), dptr, numbytes) {{endif}} {{if 'cudaLibraryGetManaged' in found_functions}} @@ -37092,8 +38302,8 @@ def cudaLibraryGetManaged(library, char* name): with nogil: err = cyruntime.cudaLibraryGetManaged(&dptr, &numbytes, cylibrary, name) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None, None) - return (_dict_cudaError_t[err], dptr, numbytes) + return (cudaError_t(err), None, None) + return (cudaError_t(err), dptr, numbytes) {{endif}} {{if 'cudaLibraryGetUnifiedFunction' in found_functions}} @@ -37138,8 +38348,8 @@ def cudaLibraryGetUnifiedFunction(library, char* symbol): with nogil: err = cyruntime.cudaLibraryGetUnifiedFunction(&fptr, cylibrary, symbol) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], fptr) + return (cudaError_t(err), None) + return (cudaError_t(err), fptr) {{endif}} {{if 'cudaLibraryGetKernelCount' in found_functions}} @@ -37178,8 +38388,8 @@ def cudaLibraryGetKernelCount(lib): with nogil: err = cyruntime.cudaLibraryGetKernelCount(&count, cylib) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], count) + return (cudaError_t(err), None) + return (cudaError_t(err), count) {{endif}} {{if 'cudaLibraryEnumerateKernels' in found_functions}} @@ -37231,8 +38441,8 @@ def cudaLibraryEnumerateKernels(unsigned int numKernels, lib): if cykernels is not NULL: free(cykernels) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pykernels) + return (cudaError_t(err), None) + return (cudaError_t(err), pykernels) {{endif}} {{if 'cudaKernelSetAttributeForDevice' in found_functions}} @@ -37338,7 +38548,7 @@ def cudaKernelSetAttributeForDevice(kernel, attr not None : cudaFuncAttribute, i cdef cyruntime.cudaFuncAttribute cyattr = int(attr) with nogil: err = cyruntime.cudaKernelSetAttributeForDevice(cykernel, cyattr, value, device) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaDeviceGetDevResource' in found_functions}} @@ -37376,8 +38586,8 @@ def cudaDeviceGetDevResource(int device, typename not None : cudaDevResourceType with nogil: err = cyruntime.cudaDeviceGetDevResource(device, resource._pvt_ptr, cytypename) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], resource) + return (cudaError_t(err), None) + return (cudaError_t(err), resource) {{endif}} {{if 'cudaDevSmResourceSplitByCount' in found_functions}} @@ -37496,8 +38706,8 @@ def cudaDevSmResourceSplitByCount(unsigned int nbGroups, input_ : Optional[cudaD if cyresult is not NULL: free(cyresult) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None, None, None) - return (_dict_cudaError_t[err], pyresult, cynbGroups, remaining) + return (cudaError_t(err), None, None, None) + return (cudaError_t(err), pyresult, cynbGroups, remaining) {{endif}} {{if 'cudaDevSmResourceSplit' in found_functions}} @@ -37656,8 +38866,8 @@ def cudaDevSmResourceSplit(unsigned int nbGroups, input_ : Optional[cudaDevResou if cyresult is not NULL: free(cyresult) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None, None) - return (_dict_cudaError_t[err], pyresult, remainder) + return (cudaError_t(err), None, None) + return (cudaError_t(err), pyresult, remainder) {{endif}} {{if 'cudaDevResourceGenerateDesc' in found_functions}} @@ -37723,8 +38933,8 @@ def cudaDevResourceGenerateDesc(resources : Optional[tuple[cudaDevResource] | li if len(resources) > 1 and cyresources is not NULL: free(cyresources) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], phDesc) + return (cudaError_t(err), None) + return (cudaError_t(err), phDesc) {{endif}} {{if 'cudaGreenCtxCreate' in found_functions}} @@ -37786,8 +38996,8 @@ def cudaGreenCtxCreate(desc, int device, unsigned int flags): with nogil: err = cyruntime.cudaGreenCtxCreate(phCtx._pvt_ptr, cydesc, device, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], phCtx) + return (cudaError_t(err), None) + return (cudaError_t(err), phCtx) {{endif}} {{if 'cudaExecutionCtxDestroy' in found_functions}} @@ -37846,7 +39056,7 @@ def cudaExecutionCtxDestroy(ctx): cyctx = pctx with nogil: err = cyruntime.cudaExecutionCtxDestroy(cyctx) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaExecutionCtxGetDevResource' in found_functions}} @@ -37891,8 +39101,8 @@ def cudaExecutionCtxGetDevResource(ctx, typename not None : cudaDevResourceType) with nogil: err = cyruntime.cudaExecutionCtxGetDevResource(cyctx, resource._pvt_ptr, cytypename) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], resource) + return (cudaError_t(err), None) + return (cudaError_t(err), resource) {{endif}} {{if 'cudaExecutionCtxGetDevice' in found_functions}} @@ -37933,8 +39143,8 @@ def cudaExecutionCtxGetDevice(ctx): with nogil: err = cyruntime.cudaExecutionCtxGetDevice(&device, cyctx) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], device) + return (cudaError_t(err), None) + return (cudaError_t(err), device) {{endif}} {{if 'cudaExecutionCtxGetId' in found_functions}} @@ -37976,8 +39186,8 @@ def cudaExecutionCtxGetId(ctx): with nogil: err = cyruntime.cudaExecutionCtxGetId(cyctx, &ctxId) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], ctxId) + return (cudaError_t(err), None) + return (cudaError_t(err), ctxId) {{endif}} {{if 'cudaExecutionCtxStreamCreate' in found_functions}} @@ -38051,8 +39261,8 @@ def cudaExecutionCtxStreamCreate(ctx, unsigned int flags, int priority): with nogil: err = cyruntime.cudaExecutionCtxStreamCreate(phStream._pvt_ptr, cyctx, flags, priority) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], phStream) + return (cudaError_t(err), None) + return (cudaError_t(err), phStream) {{endif}} {{if 'cudaExecutionCtxSynchronize' in found_functions}} @@ -38094,7 +39304,7 @@ def cudaExecutionCtxSynchronize(ctx): cyctx = pctx with nogil: err = cyruntime.cudaExecutionCtxSynchronize(cyctx) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaStreamGetDevResource' in found_functions}} @@ -38141,8 +39351,8 @@ def cudaStreamGetDevResource(hStream, typename not None : cudaDevResourceType): with nogil: err = cyruntime.cudaStreamGetDevResource(cyhStream, resource._pvt_ptr, cytypename) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], resource) + return (cudaError_t(err), None) + return (cudaError_t(err), resource) {{endif}} {{if 'cudaExecutionCtxRecordEvent' in found_functions}} @@ -38201,7 +39411,7 @@ def cudaExecutionCtxRecordEvent(ctx, event): cyctx = pctx with nogil: err = cyruntime.cudaExecutionCtxRecordEvent(cyctx, cyevent) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaExecutionCtxWaitEvent' in found_functions}} @@ -38259,7 +39469,7 @@ def cudaExecutionCtxWaitEvent(ctx, event): cyctx = pctx with nogil: err = cyruntime.cudaExecutionCtxWaitEvent(cyctx, cyevent) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaDeviceGetExecutionCtx' in found_functions}} @@ -38297,8 +39507,8 @@ def cudaDeviceGetExecutionCtx(int device): with nogil: err = cyruntime.cudaDeviceGetExecutionCtx(ctx._pvt_ptr, device) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], ctx) + return (cudaError_t(err), None) + return (cudaError_t(err), ctx) {{endif}} {{if 'cudaGetExportTable' in found_functions}} @@ -38311,8 +39521,8 @@ def cudaGetExportTable(pExportTableId : Optional[cudaUUID_t]): with nogil: err = cyruntime.cudaGetExportTable(&ppExportTable, cypExportTableId_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], ppExportTable) + return (cudaError_t(err), None) + return (cudaError_t(err), ppExportTable) {{endif}} {{if 'cudaGetKernel' in found_functions}} @@ -38355,8 +39565,8 @@ def cudaGetKernel(entryFuncAddr): with nogil: err = cyruntime.cudaGetKernel(kernelPtr._pvt_ptr, cyentryFuncAddr_ptr) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], kernelPtr) + return (cudaError_t(err), None) + return (cudaError_t(err), kernelPtr) {{endif}} {{if 'make_cudaPitchedPtr' in found_functions}} @@ -38544,8 +39754,8 @@ def cudaGraphicsEGLRegisterImage(image, unsigned int flags): with nogil: err = cyruntime.cudaGraphicsEGLRegisterImage(pCudaResource._pvt_ptr, cyimage, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], pCudaResource) + return (cudaError_t(err), None) + return (cudaError_t(err), pCudaResource) {{endif}} {{if True}} @@ -38587,8 +39797,8 @@ def cudaEGLStreamConsumerConnect(eglStream): with nogil: err = cyruntime.cudaEGLStreamConsumerConnect(conn._pvt_ptr, cyeglStream) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], conn) + return (cudaError_t(err), None) + return (cudaError_t(err), conn) {{endif}} {{if True}} @@ -38634,8 +39844,8 @@ def cudaEGLStreamConsumerConnectWithFlags(eglStream, unsigned int flags): with nogil: err = cyruntime.cudaEGLStreamConsumerConnectWithFlags(conn._pvt_ptr, cyeglStream, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], conn) + return (cudaError_t(err), None) + return (cudaError_t(err), conn) {{endif}} {{if True}} @@ -38672,7 +39882,7 @@ def cudaEGLStreamConsumerDisconnect(conn): raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) with nogil: err = cyruntime.cudaEGLStreamConsumerDisconnect(cyconn) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if True}} @@ -38738,7 +39948,7 @@ def cudaEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, unsigned int raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) with nogil: err = cyruntime.cudaEGLStreamConsumerAcquireFrame(cyconn, cypCudaResource, cypStream, timeout) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if True}} @@ -38798,7 +40008,7 @@ def cudaEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream): raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) with nogil: err = cyruntime.cudaEGLStreamConsumerReleaseFrame(cyconn, cypCudaResource, cypStream) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if True}} @@ -38860,8 +40070,8 @@ def cudaEGLStreamProducerConnect(eglStream, width, height): with nogil: err = cyruntime.cudaEGLStreamProducerConnect(conn._pvt_ptr, cyeglStream, cywidth, cyheight) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], conn) + return (cudaError_t(err), None) + return (cudaError_t(err), conn) {{endif}} {{if True}} @@ -38898,7 +40108,7 @@ def cudaEGLStreamProducerDisconnect(conn): raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) with nogil: err = cyruntime.cudaEGLStreamProducerDisconnect(cyconn) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if True}} @@ -38958,7 +40168,7 @@ def cudaEGLStreamProducerPresentFrame(conn, eglframe not None : cudaEglFrame, pS raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) with nogil: err = cyruntime.cudaEGLStreamProducerPresentFrame(cyconn, eglframe._pvt_ptr[0], cypStream) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if True}} @@ -39013,7 +40223,7 @@ def cudaEGLStreamProducerReturnFrame(conn, eglframe : Optional[cudaEglFrame], pS cdef cyruntime.cudaEglFrame* cyeglframe_ptr = eglframe._pvt_ptr if eglframe is not None else NULL with nogil: err = cyruntime.cudaEGLStreamProducerReturnFrame(cyconn, cyeglframe_ptr, cypStream) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if True}} @@ -39066,8 +40276,8 @@ def cudaGraphicsResourceGetMappedEglFrame(resource, unsigned int index, unsigned with nogil: err = cyruntime.cudaGraphicsResourceGetMappedEglFrame(eglFrame._pvt_ptr, cyresource, index, mipLevel) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], eglFrame) + return (cudaError_t(err), None) + return (cudaError_t(err), eglFrame) {{endif}} {{if True}} @@ -39122,8 +40332,8 @@ def cudaEventCreateFromEGLSync(eglSync, unsigned int flags): with nogil: err = cyruntime.cudaEventCreateFromEGLSync(phEvent._pvt_ptr, cyeglSync, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], phEvent) + return (cudaError_t(err), None) + return (cudaError_t(err), phEvent) {{endif}} {{if 'cudaProfilerStart' in found_functions}} @@ -39151,7 +40361,7 @@ def cudaProfilerStart(): """ with nogil: err = cyruntime.cudaProfilerStart() - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if 'cudaProfilerStop' in found_functions}} @@ -39179,7 +40389,7 @@ def cudaProfilerStop(): """ with nogil: err = cyruntime.cudaProfilerStop() - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if True}} @@ -39246,8 +40456,8 @@ def cudaGLGetDevices(unsigned int cudaDeviceCount, deviceList not None : cudaGLD if cypCudaDevices is not NULL: free(cypCudaDevices) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None, None) - return (_dict_cudaError_t[err], pCudaDeviceCount, pypCudaDevices) + return (cudaError_t(err), None, None) + return (cudaError_t(err), pCudaDeviceCount, pypCudaDevices) {{endif}} {{if True}} @@ -39346,8 +40556,8 @@ def cudaGraphicsGLRegisterImage(image, target, unsigned int flags): with nogil: err = cyruntime.cudaGraphicsGLRegisterImage(resource._pvt_ptr, cyimage, cytarget, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], resource) + return (cudaError_t(err), None) + return (cudaError_t(err), resource) {{endif}} {{if True}} @@ -39403,8 +40613,8 @@ def cudaGraphicsGLRegisterBuffer(buffer, unsigned int flags): with nogil: err = cyruntime.cudaGraphicsGLRegisterBuffer(resource._pvt_ptr, cybuffer, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], resource) + return (cudaError_t(err), None) + return (cudaError_t(err), resource) {{endif}} {{if True}} @@ -39456,8 +40666,8 @@ def cudaVDPAUGetDevice(vdpDevice, vdpGetProcAddress): with nogil: err = cyruntime.cudaVDPAUGetDevice(&device, cyvdpDevice, cyvdpGetProcAddress) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], device) + return (cudaError_t(err), None) + return (cudaError_t(err), device) {{endif}} {{if True}} @@ -39516,7 +40726,7 @@ def cudaVDPAUSetVDPAUDevice(int device, vdpDevice, vdpGetProcAddress): cyvdpDevice = pvdpDevice with nogil: err = cyruntime.cudaVDPAUSetVDPAUDevice(device, cyvdpDevice, cyvdpGetProcAddress) - return (_dict_cudaError_t[err],) + return (cudaError_t(err),) {{endif}} {{if True}} @@ -39572,8 +40782,8 @@ def cudaGraphicsVDPAURegisterVideoSurface(vdpSurface, unsigned int flags): with nogil: err = cyruntime.cudaGraphicsVDPAURegisterVideoSurface(resource._pvt_ptr, cyvdpSurface, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], resource) + return (cudaError_t(err), None) + return (cudaError_t(err), resource) {{endif}} {{if True}} @@ -39629,8 +40839,8 @@ def cudaGraphicsVDPAURegisterOutputSurface(vdpSurface, unsigned int flags): with nogil: err = cyruntime.cudaGraphicsVDPAURegisterOutputSurface(resource._pvt_ptr, cyvdpSurface, flags) if err != cyruntime.cudaSuccess: - return (_dict_cudaError_t[err], None) - return (_dict_cudaError_t[err], resource) + return (cudaError_t(err), None) + return (cudaError_t(err), resource) {{endif}} diff --git a/cuda_bindings/docs/source/release/13.1.2-notes.rst b/cuda_bindings/docs/source/release/13.1.2-notes.rst index a7f8fbb773..3869ef3dbc 100644 --- a/cuda_bindings/docs/source/release/13.1.2-notes.rst +++ b/cuda_bindings/docs/source/release/13.1.2-notes.rst @@ -1,4 +1,4 @@ -.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. .. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE .. module:: cuda.bindings @@ -10,6 +10,10 @@ Highlights ---------- * Add ``nvFatbin`` bindings. (PR #1467 _) +* Performance improvement: ``cuda.bindings`` now uses a faster ``enum`` + implementation, rather than the standard library's ``enum.IntEnum``. + This leads to much faster import times, and slightly faster attribute access + times. (`PR #1581 `_) Experimental ------------ diff --git a/cuda_bindings/tests/test_basics.py b/cuda_bindings/tests/test_basics.py new file mode 100644 index 0000000000..3cc3891abc --- /dev/null +++ b/cuda_bindings/tests/test_basics.py @@ -0,0 +1,89 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +import enum +import sys + +import pytest +from cuda.bindings._internal import _fast_enum + +# Test both with the FastEnum implementation and the stdlib enum.IntEnum (even +# though we don't use the latter) to make sure that the two APIs are identical + + +class MyFastEnum(_fast_enum.FastEnum): + RED = 0 + GREEN = 1 + BLUE = 2 + + +class MyIntEnum(enum.IntEnum): + RED = 0 + GREEN = 1 + BLUE = 2 + + +@pytest.mark.parametrize("MyEnum", [MyFastEnum, MyIntEnum]) +def test_enum(MyEnum): + container = MyEnum + + val = container.GREEN + + assert isinstance(val, MyEnum) + + assert container(1) is val + + with pytest.raises(ValueError): + container(3) + + # Different Python versions raise different error types here from + # stdlib.enum.IntEnum + with pytest.raises((ValueError, TypeError)): + container(1, 2, 3) + + with pytest.raises(TypeError): + container(foo=1) + + assert val == 1 + assert val.value == 1 + assert isinstance(val.value, int) + assert val.name == "GREEN" + assert isinstance(val.name, str) + + assert container.GREEN | container.BLUE == 3 + assert repr(container.GREEN | container.BLUE) == "3" + assert type(container.GREEN | container.BLUE) is int + assert container.GREEN.BLUE is container.BLUE + + assert repr(container) == f"" + assert repr(val) == f"<{container.__name__}.GREEN: 1>" + + assert len(container) == 3 + + for item in container: + assert isinstance(item, container) + assert item in container + if sys.version_info >= (3, 12): + assert item.value in container + assert item.name in dir(container) + for item2 in container: + assert hasattr(item, item2.name) + if sys.version_info >= (3, 11): + assert item2.name in dir(item) + assert getattr(item, item2.name) is item2 + + for name, val in container.__members__.items(): + assert isinstance(val, container) + assert isinstance(name, str) + assert name == val.name + + +def test_enum_doc(): + class MyFastEnumDoc(_fast_enum.FastEnum): + RED = (0, "The color red") + GREEN = (1, "The color green") + BLUE = (2, "The color blue") + + assert MyFastEnumDoc.RED.__doc__ == "The color red" + assert MyFastEnumDoc.GREEN.__doc__ == "The color green" + assert MyFastEnumDoc.BLUE.__doc__ == "The color blue"