GetTiling

Function

Obtains the Mc2InitTiling and Mc2CcTiling parameters.

Prototype

1
uint32_t GetTiling(::Mc2InitTiling &tiling)
1
uint32_t GetTiling(::Mc2CcTiling &tiling)

Parameters

Table 1 Parameters

Parameter

Input/Output

Description

tiling

Output

Tiling information stored in the tiling structure.

Returns

  • If the return value is 0, the tiling computation is successful. The value of the tiling structure can be used for subsequent computation.
  • If the return value is not 0, the tiling computation fails and the tiling result cannot be used.

Restrictions

None

Example

1
2
3
4
5
6
7
const char *groupName = "testGroup";
uint32_t opType = HCCL_CMD_REDUCE_SCATTER;
std::string algConfig = "ReduceScatter=level0:fullmesh";
uint32_t reduceType = HCCL_REDUCE_SUM;
AscendC::Mc2CcTilingConfig mc2CcTilingConfig(groupName, opType, algConfig, reduceType);
mc2CcTilingConfig.GetTiling(tiling->mc2InitTiling); // tiling is the TilingData structure assembled by the operator. Obtain Mc2InitTiling.
mc2CcTilingConfig.GetTiling(tiling->reduceScatterTiling); // tiling is the TilingData structure assembled by the operator. Obtain Mc2CcTiling.