SetDebugMode

Function

Sets the debugging mode.

Prototype

1
uint32_t SetDebugMode(uint8_t debugMode)

Parameters

Table 1 Parameters

Parameter

Input/Output

Description

debugMode

Input

Indicates the selected debugging mode, which is of the uint8_t type. The options are as follows:

  • 1: disables the communication function of the high-level HCCL APIs.
  • 2: prints information such as the message queue and the number of times the Prepare message is executed.
  • 3: prints the data in the source and destination data buffers of the Prepare message.
  • 4: prints the timestamps and time consumed in each phase when the AI CPU server executes communication tasks. The information is printed once every 30 operators.

Returns

  • 0: Setting succeeded.
  • Other values: Setting failed.

Restrictions

None

Example

1
2
3
4
5
6
7
8
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.SetDebugMode(3); // Set the debugging mode.
mc2CcTilingConfig.GetTiling(tiling->mc2InitTiling);
mc2CcTilingConfig.GetTiling(tiling->reduceScatterTiling);