SetScheduleMode
Description
Sets the scheduling mode of operators when they are executed on NPUs.
Prototype
ge::graphStatus SetScheduleMode(const uint32_t schedule_mode)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
schedule_mode |
Input |
0 (default): common mode. 1: batchmode. This mode needs to be set for inter-core synchronization operators. |
Returns
ge::GRAPH_SUCCESS on success.
ge::GRAPH_FAILED on failure.
For details about the definition of graphStatus, see ge::graphStatus.
Restrictions
None
Example
ge::graphStatus TilingForAdd(TilingContext *context) {
uint32_t batch_mode = 1U;
auto ret = context->SetScheduleMode(batch_mode);
GE_ASSERT_SUCCESS(ret);
...
}
Parent topic: TilingContext