REGISTER_TILING_DEFAULT
Supported Products
Product |
Supported/Unsupported |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
x |
Functions
Registers the default TilingData structure defined by the user using the standard C++ syntax on the kernel.
Register the TilingData structure to notify the framework user to use the standard C++ syntax for defining TilingData, and also notify the framework of the TilingData structure type for parsing tiling data.
Prototype
1 | REGISTER_TILING_DEFAULT(TILING_STRUCT) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
TILING_STRUCT |
Input |
Default custom TilingData structure registered by the user. |
Constraints
- If the TilingData structure is in the namespace, the corresponding namespace scope resolution operator must be carried during registration.
- Currently, the kernel launch project is not supported.
Example
1 2 3 4 5 6 7 8 | extern "C" __global__ __aicore__ void add_custom(__gm__ uint8_t *x, __gm__ uint8_t *y, __gm__ uint8_t *z, __gm__ uint8_t *tiling) { REGISTER_TILING_DEFAULT(optiling::TilingData); GET_TILING_DATA(tilingData, tiling); KernelAdd op; op.Init(x, y, z, tilingData.blkDim, tilingData.totalSize, tilingData.splitTile); op.Process(); } |
Parent topic: Kernel Tiling