Function: set_ts_device

Applicable Products

  • Ascend 950PR&950DT products: Supported
  • Atlas A3 products: Supported
  • Atlas A2 products: Supported
  • Atlas 200I/500 A2 inference products: Supported
  • Atlas inference products: Supported
  • Atlas training products: Supported

Function

Sets the task schedule required for the computation.

Prototype

  • C Prototype

    aclError aclrtSetTsDevice(aclrtTsId tsId)
    
  • Python Function

    ret = acl.rt.set_ts_device(ts_id)
    

Parameters

Parameter Description
ts_Id Int, task schedule required for the computation. If the Ascend AI software stack contains only the AICORE Task Schedule, this parameter is invalid and the AICORE Task Schedule is used by default.
0: ACL_TS_ID_AICORE. Use the AICORE task schedule.
1: ACL_TS_ID_AIVECTOR. Use the AIVECTOR Task Schedule.
2: ACL_TS_ID_RESERVED.

Return Values

Return Value Description
ret Int, error code. If 0 is returned, the operation is successful. If other values are returned, the operation fails.