Mojo struct
DeviceAttribute
struct DeviceAttribute
Represents CUDA device attributes that can be queried from a GPU device.
This struct encapsulates the various device properties and capabilities that can be queried through the CUDA driver API. Each attribute is represented as a constant with a corresponding integer value that maps to the CUDA driver's attribute enum.
Implemented traits
AnyType,
Copyable,
ImplicitlyCopyable,
ImplicitlyDestructible,
Movable,
RegisterPassable,
TrivialRegisterPassable
comptime members
CLOCK_RATE
comptime CLOCK_RATE = DeviceAttribute(SIMD(13))
Typical clock frequency in kilohertz.
COMPUTE_CAPABILITY_MAJOR
comptime COMPUTE_CAPABILITY_MAJOR = DeviceAttribute(SIMD(75))
Major compute capability version number.
COMPUTE_CAPABILITY_MINOR
comptime COMPUTE_CAPABILITY_MINOR = DeviceAttribute(SIMD(76))
Minor compute capability version number.
COOPERATIVE_LAUNCH
comptime COOPERATIVE_LAUNCH = DeviceAttribute(SIMD(95))
Device supports launching cooperative kernels.
MAX_ACCESS_POLICY_WINDOW_SIZE
comptime MAX_ACCESS_POLICY_WINDOW_SIZE = DeviceAttribute(SIMD(109))
CUDA-only: Maximum value of CUaccessPolicyWindow::num_bytes.
MAX_BLOCK_DIM_X
comptime MAX_BLOCK_DIM_X = DeviceAttribute(SIMD(2))
Maximum block dimension X.
MAX_BLOCK_DIM_Y
comptime MAX_BLOCK_DIM_Y = DeviceAttribute(SIMD(3))
Maximum block dimension Y.
MAX_BLOCK_DIM_Z
comptime MAX_BLOCK_DIM_Z = DeviceAttribute(SIMD(4))
Maximum block dimension Z.
MAX_BLOCKS_PER_MULTIPROCESSOR
comptime MAX_BLOCKS_PER_MULTIPROCESSOR = DeviceAttribute(SIMD(106))
Maximum resident blocks per multiprocessor.
MAX_GRID_DIM_X
comptime MAX_GRID_DIM_X = DeviceAttribute(SIMD(5))
Maximum grid dimension X.
MAX_GRID_DIM_Y
comptime MAX_GRID_DIM_Y = DeviceAttribute(SIMD(6))
Maximum grid dimension Y.
MAX_GRID_DIM_Z
comptime MAX_GRID_DIM_Z = DeviceAttribute(SIMD(7))
Maximum grid dimension Z.
MAX_REGISTERS_PER_BLOCK
comptime MAX_REGISTERS_PER_BLOCK = DeviceAttribute(SIMD(12))
Maximum number of 32-bit registers available per block.
MAX_REGISTERS_PER_MULTIPROCESSOR
comptime MAX_REGISTERS_PER_MULTIPROCESSOR = DeviceAttribute(SIMD(82))
Maximum number of 32-bit registers available per multiprocessor.
MAX_SHARED_MEMORY_PER_BLOCK
comptime MAX_SHARED_MEMORY_PER_BLOCK = DeviceAttribute(SIMD(8))
Maximum shared memory available per block in bytes.
MAX_SHARED_MEMORY_PER_BLOCK_OPTIN
comptime MAX_SHARED_MEMORY_PER_BLOCK_OPTIN = DeviceAttribute(SIMD(97))
Maximum shared memory per block usable via cudaFuncSetAttribute.
MAX_SHARED_MEMORY_PER_MULTIPROCESSOR
comptime MAX_SHARED_MEMORY_PER_MULTIPROCESSOR = DeviceAttribute(SIMD(81))
Maximum shared memory available per multiprocessor in bytes.
MAX_THREADS_PER_BLOCK
comptime MAX_THREADS_PER_BLOCK = DeviceAttribute(SIMD(1))
Maximum number of threads per block.
MAX_THREADS_PER_MULTIPROCESSOR
comptime MAX_THREADS_PER_MULTIPROCESSOR = DeviceAttribute(SIMD(39))
Maximum resident threads per multiprocessor.
MULTIPROCESSOR_COUNT
comptime MULTIPROCESSOR_COUNT = DeviceAttribute(SIMD(16))
Number of multiprocessors on device.
WARP_SIZE
comptime WARP_SIZE = DeviceAttribute(SIMD(10))
Warp size in threads.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!