Skip to main content
Version: Nightly

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(Int32(13))

Typical clock frequency in kilohertz.

COMPUTE_CAPABILITY_MAJOR

comptime COMPUTE_CAPABILITY_MAJOR = DeviceAttribute(Int32(75))

Major compute capability version number.

COMPUTE_CAPABILITY_MINOR

comptime COMPUTE_CAPABILITY_MINOR = DeviceAttribute(Int32(76))

Minor compute capability version number.

COOPERATIVE_LAUNCH

comptime COOPERATIVE_LAUNCH = DeviceAttribute(Int32(95))

Device supports launching cooperative kernels.

MAX_ACCESS_POLICY_WINDOW_SIZE

comptime MAX_ACCESS_POLICY_WINDOW_SIZE = DeviceAttribute(Int32(109))

CUDA-only: Maximum value of CUaccessPolicyWindow::num_bytes.

MAX_BLOCK_DIM_X

comptime MAX_BLOCK_DIM_X = DeviceAttribute(Int32(2))

Maximum block dimension X.

MAX_BLOCK_DIM_Y

comptime MAX_BLOCK_DIM_Y = DeviceAttribute(Int32(3))

Maximum block dimension Y.

MAX_BLOCK_DIM_Z

comptime MAX_BLOCK_DIM_Z = DeviceAttribute(Int32(4))

Maximum block dimension Z.

MAX_BLOCKS_PER_MULTIPROCESSOR

comptime MAX_BLOCKS_PER_MULTIPROCESSOR = DeviceAttribute(Int32(106))

Maximum resident blocks per multiprocessor.

MAX_GRID_DIM_X

comptime MAX_GRID_DIM_X = DeviceAttribute(Int32(5))

Maximum grid dimension X.

MAX_GRID_DIM_Y

comptime MAX_GRID_DIM_Y = DeviceAttribute(Int32(6))

Maximum grid dimension Y.

MAX_GRID_DIM_Z

comptime MAX_GRID_DIM_Z = DeviceAttribute(Int32(7))

Maximum grid dimension Z.

MAX_REGISTERS_PER_BLOCK

comptime MAX_REGISTERS_PER_BLOCK = DeviceAttribute(Int32(12))

Maximum number of 32-bit registers available per block.

MAX_REGISTERS_PER_MULTIPROCESSOR

comptime MAX_REGISTERS_PER_MULTIPROCESSOR = DeviceAttribute(Int32(82))

Maximum number of 32-bit registers available per multiprocessor.

MAX_SHARED_MEMORY_PER_BLOCK

comptime MAX_SHARED_MEMORY_PER_BLOCK = DeviceAttribute(Int32(8))

Maximum shared memory available per block in bytes.

MAX_SHARED_MEMORY_PER_BLOCK_OPTIN

comptime MAX_SHARED_MEMORY_PER_BLOCK_OPTIN = DeviceAttribute(Int32(97))

Maximum shared memory per block usable via cudaFuncSetAttribute.

MAX_SHARED_MEMORY_PER_MULTIPROCESSOR

comptime MAX_SHARED_MEMORY_PER_MULTIPROCESSOR = DeviceAttribute(Int32(81))

Maximum shared memory available per multiprocessor in bytes.

MAX_THREADS_PER_BLOCK

comptime MAX_THREADS_PER_BLOCK = DeviceAttribute(Int32(1))

Maximum number of threads per block.

MAX_THREADS_PER_MULTIPROCESSOR

comptime MAX_THREADS_PER_MULTIPROCESSOR = DeviceAttribute(Int32(39))

Maximum resident threads per multiprocessor.

MULTIPROCESSOR_COUNT

comptime MULTIPROCESSOR_COUNT = DeviceAttribute(Int32(16))

Number of multiprocessors on device.

WARP_SIZE

comptime WARP_SIZE = DeviceAttribute(Int32(10))

Warp size in threads.