SimtBlockDim

Function Usage

Sets the dimension of a SIMT thread block, that is, the number of threads in the thread block of the Vector unit involved in computation. The dimension is represented by the Dim3 structure. Dim3 is a structure that contains three UInt32 fields: x, y, and z. It represents the number of threads in a thread block in the x, y, and z dimensions. The operator tiling function can obtain the corresponding Dim3 pointer through the TilingContext constructed by this Builder class.

For example, block_dim.x, block_dim.y, and block_dim.z represent the number of threads in the x, y, and z dimensions of a thread block, respectively.

Prototype

OpTilingContextBuilder &SimtBlockDim(const gert::Dim3 *block_dim)

Parameters

Parameter

Input/Output

Description

block_dim

Input

Sets the input block dim pointer.

Returns

A reference to the OpTilingContextBuilder object. It is used for chaining method calls.

Constraints

  • SimtBlockDim must be set before the Build method call. Otherwise, the constructed TilingContext will contain undefined data.
  • The caller has the memory ownership of the gert::Dim3* parameter passed through a pointer. They must ensure that the pointer is valid throughout the lifecycle of the ContextHolder object.