pub unsafe extern "C" fn hipKernelGetAttribute(
pi: *mut c_int,
attrib: hipFunction_attribute,
kernel: hipKernel_t,
dev: hipDevice_t,
) -> hipError_tExpand description
@brief Returns information about a kernel.
@param[out] pi Returned attribute value @param[in] attrib Attribute requested @param[in] kernel Kernel to query attribute of @param[in] dev Device to query attribute of
@returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidHandle, #hipErrorInvalidDevice, #hipErrorInvalidDeviceFunction, #hipErrorMissingConfiguration
Returns in *pi the integer value of the attribute attrib for the kernel kernel for the requested device dev. The supported attributes are:
- HIP_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK The maximum number of threads per block. This number depends on both the kernel and the requested device.
- HIP_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES The size in bytes of statically-allocated shared memory per block required by this kernel. This does not include dynamically-allocated shared memory requested by the user at runtime.
- HIP_FUNC_ATTRIBUTE_CONST_SIZE_BYTES The size in bytes of user-allocated constant memory required by this kernel.
- HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES The size in bytes of local memory used by each thread of this kernel.
- HIP_FUNC_ATTRIBUTE_NUM_REGS The number of registers used by each thread of this kernel.
- HIP_FUNC_ATTRIBUTE_PTX_VERSION The PTX virtual architecture version for which the kernel 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.
- HIP_FUNC_ATTRIBUTE_BINARY_VERSION The binary architecture version for which the kernel 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.
- HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES The maximum size in bytes of dynamically-allocated shared memory.
- HIP_FUNC_ATTRIBUTE_CACHE_MODE_CA The attribute to indicate whether the kernel has been compiled with user specified option “-Xptxas –dlcm=ca” set.
- HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT Preferred shared memory-L1 cache split ratio in percent of total shared memory.
@see hipLibraryLoadData, hipLibraryLoadFromFile, hipLibraryUnload, hipKernelSetAttribute, hipLibraryGetKernel, hipLaunchKernel, hipKernelGetFunction, hipLibraryGetModule, hipModuleGetFunction, hipFuncGetAttribute