---
title: aclrtSetTsDevice
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/runtimeapi/aclcppdevg_03_0044.html
sourcePath: /source/zh/canncommercial/900/API/runtimeapi/aclcppdevg_03_0044.html
indexId: 4f62c34bbeb9c76b53b5fd92d3e7379d31afe81ab6f337f78c553bf73d61fb5a68
---
# aclrtSetTsDevice

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | √ |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | √ |
| Atlas 推理系列产品 | √ |
| Atlas 训练系列产品 | √ |


#### 功能说明

设置本次计算需要使用的Task Schedule。


#### 函数原型

```
aclError aclrtSetTsDevice(aclrtTsId tsId)
```


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| tsId | 输入 | 指定本次计算需要使用的Task Schedule。如果AI处理器中只有AI CORE Task Schedule，没有VECTOR Core Task Schedule，则设置该参数无效，默认使用AI CORE Task Schedule。 typedef enum aclrtTsId { ACL\_TS\_ID\_AICORE = 0, //使用AI CORE Task Schedule ACL\_TS\_ID\_AIVECTOR = 1, //使用VECTOR Core Task Schedule ACL\_TS\_ID\_RESERVED = 2, } aclrtTsId; |


#### 返回值说明

返回0表示成功，返回其他值表示失败，请参见aclError。
