hipkernelgetattribute Interface Reference#
hipfort::hipkernelgetattribute Interface Reference
Returns information about a kernel. More...
Public Member Functions | |
| integer(kind(hipsuccess)) function | hipkernelgetattribute_ (pi, attrib, kernel, dev) |
Detailed Description
Returns information about a kernel.
- Parameters
-
[out] pi - Returned attribute value [in] attrib - Attribute requested [in] kernel - Kernel to query attribute of [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 also
- hipLibraryLoadData, hipLibraryLoadFromFile, hipLibraryUnload, hipKernelSetAttribute, hipLibraryGetKernel, hipLaunchKernel, hipKernelGetFunction, hipLibraryGetModule, hipModuleGetFunction, hipFuncGetAttribute
Member Function/Subroutine Documentation
◆ hipkernelgetattribute_()
| integer(kind(hipsuccess)) function hipfort::hipkernelgetattribute::hipkernelgetattribute_ | ( | type(c_ptr), value | pi, |
| integer(kind(hip_func_attribute_max_threads_per_block)), value | attrib, | ||
| type(c_ptr), value | kernel, | ||
| integer(c_int), value | dev | ||
| ) |
The documentation for this interface was generated from the following file: