cuda.core._module.KernelAttributes#

class cuda.core._module.KernelAttributes(*args, **kwargs)#

Provides access to kernel attributes. Uses weakref to avoid preventing Kernel GC.

Methods

__init__(*args, **kwargs)#
binary_version(
self,
device_id: Device | int = None,
) int#

int : The binary architecture version for which the function was compiled. This attribute is read-only.

cache_mode_ca(
self,
device_id: Device | int = None,
) bool#

bool : Whether the function has been compiled with user specified option “-Xptxas –dlcm=ca” set. This attribute is read-only.

cluster_scheduling_policy_preference(
self,
device_id: Device | int = None,
) int#

int : The block scheduling policy of a function.

cluster_size_must_be_set(
self,
device_id: Device | int = None,
) bool#

bool : The kernel must launch with a valid cluster size specified. This attribute is read-only.

const_size_bytes(
self,
device_id: Device | int = None,
) int#

int : The size in bytes of user-allocated constant memory required by this function. This attribute is read-only.

local_size_bytes(
self,
device_id: Device | int = None,
) int#

int : The size in bytes of local memory used by each thread of this function. This attribute is read-only.

max_dynamic_shared_size_bytes(
self,
device_id: Device | int = None,
) int#

int : The maximum size in bytes of dynamically-allocated shared memory that can be used by this function.

max_threads_per_block(
self,
device_id: Device | int = None,
) int#

int : The maximum number of threads per block. This attribute is read-only.

non_portable_cluster_size_allowed(
self,
device_id: Device | int = None,
) bool#

bool : Whether the function can be launched with non-portable cluster size.

num_regs(self, device_id: Device | int = None) int#

int : The number of registers used by each thread of this function. This attribute is read-only.

preferred_shared_memory_carveout(
self,
device_id: Device | int = None,
) int#

int : The shared memory carveout preference, in percent of the total shared memory.

ptx_version(
self,
device_id: Device | int = None,
) int#

int : The PTX virtual architecture version for which the function was compiled. This attribute is read-only.

required_cluster_depth(
self,
device_id: Device | int = None,
) int#

int : The required cluster depth in blocks.

required_cluster_height(
self,
device_id: Device | int = None,
) int#

int : The required cluster height in blocks.

required_cluster_width(
self,
device_id: Device | int = None,
) int#

int : The required cluster width in blocks.

shared_size_bytes(
self,
device_id: Device | int = None,
) int#

int : The size in bytes of statically-allocated shared memory required by this function. This attribute is read-only.