pub unsafe extern "C" fn cuTensorMapEncodeTiled(
tensorMap: *mut CUtensorMap,
tensorDataType: CUtensorMapDataType,
tensorRank: cuuint32_t,
globalAddress: *mut c_void,
globalDim: *const cuuint64_t,
globalStrides: *const cuuint64_t,
boxDim: *const cuuint32_t,
elementStrides: *const cuuint32_t,
interleave: CUtensorMapInterleave,
swizzle: CUtensorMapSwizzle,
l2Promotion: CUtensorMapL2promotion,
oobFill: CUtensorMapFloatOOBfill,
) -> CUresultExpand description
Create a tensor map descriptor object representing tiled memory region.
Creates a descriptor for Tensor Memory Access (TMA) object specified by the parameters describing a tiled region and returns it in tensorMap.
Tensor map objects are only supported on devices of compute capability 9.0 or higher. Additionally, a tensor map object is an opaque value, and, as such, should only be accessed through CUDA APIs and PTX.
The parameters passed are bound to the following requirements:
globalDim array, which specifies tensor size of each of the tensorRank dimensions, must be non-zero and less than or equal to 2^32. Additionally, the following requirements need to be met for the packed data types:
globalStrides array, which specifies tensor stride of each of the lower tensorRank - 1 dimensions in bytes, must be a multiple of 16 and less than 2^40. Additionally, the following requirements need to be met:
boxDim array, which specifies number of elements to be traversed along each of the tensorRank dimensions, must be non-zero and less than or equal to 256. Additionally, the following requirements need to be met:
elementStrides array, which specifies the iteration step along each of the tensorRank dimensions, must be non-zero and less than or equal to 8. Note that when interleave is CUtensorMapInterleave::CU_TENSOR_MAP_INTERLEAVE_NONE, the first element of this array is ignored since TMA doesn’t support the stride for dimension zero. When all elements of elementStrides array is one, boxDim specifies the number of elements to load. However, if the elementStrides[i] is not equal to one, then TMA loads ceil( boxDim[i] / elementStrides[i]) number of elements along i-th dimension. To load N elements along i-th dimension, boxDim[i] must be set to N * elementStrides[i].
§Parameters
tensorMap: Tensor map object to create.tensorDataType: Tensor data type.tensorRank: Dimensionality of tensor.globalAddress: Starting address of memory region described by tensor.globalDim: Array containing tensor size (number of elements) along each of thetensorRankdimensions.globalStrides: Array containing stride size (in bytes) along each of thetensorRank- 1 dimensions.boxDim: Array containing traversal box size (number of elments) along each of thetensorRankdimensions. Specifies how many elements to be traversed along each tensor dimension.elementStrides: Array containing traversal stride in each of thetensorRankdimensions.interleave: Type of interleaved layout the tensor addresses.swizzle: Bank swizzling pattern inside shared memory.l2Promotion: L2 promotion size.oobFill: Indicate whether zero or special NaN constant must be used to fill out-of-bound elements.