SetAicpuNumBlocks

Function Usage

Sets the number of AI CPU cores that can be scheduled.

When using the HCCL high-level API BatchWrite, you can set the number of AI CPU cores appropriately to obtain better performance.

Prototype

1
ge::graphStatus SetAicpuNumBlocks(uint32_t num_blocks)

Parameters

Parameter

Input/Output

Description

SetAicpuNumBlocks

Input

Number of AI CPU cores that can be scheduled.

Returns

ge::GRAPH_SUCCESS on success.

For details about the definition of graphStatus, see ge::graphStatus.

Constraints

None

Examples

1
2
3
4
ge::graphStatus Tiling4XXX(TilingContext* context) {
  auto ret = context->SetAicpuNumBlocks(5U);
  // ...
}