SetSimtBlockDim

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.

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.

This API is reserved for subsequent functions. Currently, the capability is incomplete. You are not advised to use this API.

Prototype

1
ge::graphStatus SetSimtBlockDim(const Dim3 &block_dim)

Parameters

Parameter

Input/Output

Description

block_dim

Input

Dimension of a thread block, represented by a 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 Dim3 structure is defined as follows:

struct Dim3 {
  uint32_t x, y, z;
  Dim3(const uint32_t dim3_x, const uint32_t dim3_y = 1, const uint32_t dim3_z = 1) : x(dim3_x), y(dim3_y), z(dim3_z) {
  }
};

Note: Dim3 is a structure that contains three uint32 fields: x, y, and z. In SIMT, it can represent the number of threads in a block in the x, y, and z dimensions, or the number of thread blocks in a grid in the x, y, and z dimensions.

Returns

ge::GRAPH_SUCCESS on success.

For details about the definition of graphStatus, see ge::graphStatus.

Constraints

None

Examples

1
2
3
4
5
gert::Dim3 block_dim(2, 3);
ge::graphStatus Tiling4XXX(TilingContext* context) {
  auto ret = context->SetSimtBlockDim(block_dim);
  // ...
}