REGIST_MATMUL_OBJ

Function Description

Initializes the Matmul object.

Prototype

1
REGIST_MATMUL_OBJ(tpipe, workspace, ...)

Parameters

Table 1 Parameters

Parameter

Input/Output

Description

tpipe

Input

Tpipe object.

workspace

Input

Pointer to the system workspace.

...

Input

Variable parameter. If the Matmul object and the corresponding Tiling structure are passed, the data type of the Tiling structure must be TCubeTiling.

Tiling parameters can be obtained through GetTiling on the host and passed to the kernel for use.

Returns

None

Precautions

Example

1
2
3
4
5
6
7
// Recommendation: Initialize a single Matmul object and pass tiling parameters.
REGIST_MATMUL_OBJ(&pipe, GetSysWorkSpacePtr(), mm, &tiling);
// Recommendation: Initialize multiple Matmul objects and pass the corresponding tiling parameters.
REGIST_MATMUL_OBJ(&pipeIn, GetSysWorkSpacePtr(), mm1, mm1tiling, mm2, mm2tiling, mm3, mm3tiling, mm4, mm4tiling);
// Initialize a single Matmul object without passing tiling parameters. Note that in this scenario, the Init API needs to be used to pass tiling parameters. In this way, operations for the initialization of the Matmul object and setting for tiling parameters are separated. It is applicable to scenarios where tiling is variable and needs to be reset for multiple times.
REGIST_MATMUL_OBJ(&pipe, GetSysWorkSpacePtr(), mm);
mm.Init(&tiling);