Function: get_run_mode

Description

Obtains the current run 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()
    

Parameters

Parameter

Description

run_mode

Int, running mode. For details about the type definition, see aclrtRunMode.

Return Value

Return Value

Description

ret

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

Reference

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