Mojo struct
DeviceAttribute
@register_passable(trivial)
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
,
Movable
,
UnknownDestructibility
Aliases
CLOCK_RATE
alias CLOCK_RATE = DeviceAttribute(13)
Typical clock frequency in kilohertz
COMPUTE_CAPABILITY_MAJOR
alias COMPUTE_CAPABILITY_MAJOR = DeviceAttribute(75)
Major compute capability version number
COMPUTE_CAPABILITY_MINOR
alias COMPUTE_CAPABILITY_MINOR = DeviceAttribute(76)
Minor compute capability version number
MAX_ACCESS_POLICY_WINDOW_SIZE
alias MAX_ACCESS_POLICY_WINDOW_SIZE = DeviceAttribute(109)
CUDA-only: Maximum value of CUaccessPolicyWindow::num_bytes.
MAX_BLOCK_DIM_X
alias MAX_BLOCK_DIM_X = DeviceAttribute(2)
Maximum block dimension X
MAX_BLOCK_DIM_Y
alias MAX_BLOCK_DIM_Y = DeviceAttribute(3)
Maximum block dimension Y
MAX_BLOCK_DIM_Z
alias MAX_BLOCK_DIM_Z = DeviceAttribute(4)
Maximum block dimension Z
MAX_BLOCKS_PER_MULTIPROCESSOR
alias MAX_BLOCKS_PER_MULTIPROCESSOR = DeviceAttribute(106)
Maximum resident blocks per multiprocessor
MAX_GRID_DIM_X
alias MAX_GRID_DIM_X = DeviceAttribute(5)
Maximum grid dimension X
MAX_GRID_DIM_Y
alias MAX_GRID_DIM_Y = DeviceAttribute(6)
Maximum grid dimension Y
MAX_GRID_DIM_Z
alias MAX_GRID_DIM_Z = DeviceAttribute(7)
Maximum grid dimension Z
MAX_REGISTERS_PER_BLOCK
alias MAX_REGISTERS_PER_BLOCK = DeviceAttribute(12)
Maximum number of 32-bit registers available per block
MAX_REGISTERS_PER_MULTIPROCESSOR
alias MAX_REGISTERS_PER_MULTIPROCESSOR = DeviceAttribute(82)
Maximum number of 32-bit registers available per multiprocessor
MAX_SHARED_MEMORY_PER_BLOCK
alias MAX_SHARED_MEMORY_PER_BLOCK = DeviceAttribute(8)
Maximum shared memory available per block in bytes
MAX_SHARED_MEMORY_PER_MULTIPROCESSOR
alias MAX_SHARED_MEMORY_PER_MULTIPROCESSOR = DeviceAttribute(81)
Maximum shared memory available per multiprocessor in bytes
MAX_THREADS_PER_BLOCK
alias MAX_THREADS_PER_BLOCK = DeviceAttribute(1)
Maximum number of threads per block
MAX_THREADS_PER_MULTIPROCESSOR
alias MAX_THREADS_PER_MULTIPROCESSOR = DeviceAttribute(39)
Maximum resident threads per multiprocessor
MULTIPROCESSOR_COUNT
alias MULTIPROCESSOR_COUNT = DeviceAttribute(16)
Number of multiprocessors on device
WARP_SIZE
alias WARP_SIZE = DeviceAttribute(10)
Warp size in threads
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!