Function: set_ts_device

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

Sets the task schedule required for the computation.

Prototype

  • C Prototype
    1
    aclError aclrtSetTsDevice(aclrtTsId tsId)
    
  • Python Function
    1
    ret = acl.rt.set_ts_device(ts_id)
    

Parameter Description

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 Value Description

Return Value

Description

ret

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