Function: get_run_mode

C Prototype

aclError aclrtGetRunMode(aclrtRunMode *runMode)

Python Function

run_mode, ret = acl.rt.get_run_mode()

Function Usage

Obtains the current running mode of the Ascend AI Software Stack.

Input Description

None

Return Value

run_mode: int, running mode.

  • 0: ACL_DEVICE. The Ascend AI Software Stack runs on the on-device Ctrl CPU or in the board environment.

    The Atlas Training Series Product does not support this mode.

  • 1: ACL_HOST. The Ascend AI Software Stack runs on host CPU.

ret: int, error code.

Restrictions

None

Reference

For details about the API call sequence and example, see Runtime Resource Allocation and Deallocation.