Function: get_run_mode

Applicability

Product

Supported (√/x)

Atlas A3 training products / Atlas A3 inference products

Atlas A2 training products / Atlas A2 inference products

Atlas training products

Atlas inference products

Atlas 200I/500 A2 inference products

Function Usage

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

Prototype

  • C Prototype
    1
    aclError aclrtGetRunMode(aclrtRunMode *runMode)
    
  • Python Function
    1
    run_mode, ret = acl.rt.get_run_mode()
    

Parameter Description

Parameter

Description

run_mode

Int, running mode.

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

    The Atlas training products does not support this option.

    The Atlas A2 training products / Atlas A2 inference products does not support this option.

    The Atlas A3 training products / Atlas A3 inference products does not support this option.

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

Return Value Description

Return Value

Description

ret

Int, error code: 0 on success; else, failure.

Reference

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