SetSimtGridDim
Function Usage
Sets the dimension of a SIMT thread grid, that is, the number of thread blocks in the thread grid 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 thread blocks in a thread grid in the x, y, and z dimensions.
For example, block_dim.x, block_dim.y, and block_dim.z represent the number of thread blocks in the x, y, and z dimensions of a thread grid, respectively.
This API is reserved for subsequent functions. Currently, the capability is incomplete. You are not advised to use this API.
Prototype
ge::graphStatus SetSimtGridDim(const Dim3 &grid_dim)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
grid_dim |
Input |
Thread grid dimensions. Dim3 is a structure that contains three UInt32 fields: x, y, and z. It represents the number of thread blocks in a thread grid 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 grid_dim(2, 3); ge::graphStatus Tiling4XXX(TilingContext* context) { auto ret = context->SetSimtGridDim(grid_dim); // ... } |