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

#### 产品支持情况

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


#### 功能说明

设置TensorDesc的placement属性，用于标识存放Tensor数据的内存类型。


#### 函数原型

```
aclError aclSetTensorPlaceMent(aclTensorDesc *desc, aclMemType memType)
```


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| desc | 输出 | aclTensorDesc类型的指针。 需提前调用aclCreateTensorDesc接口创建aclTensorDesc类型。 |
| memType | 输入 | 指定placement属性值。类型定义请参见aclMemType(https://www.hiascend.comdocument/detail/zh/canncommercial/900/API/runtimeapi/aclcppdevg\_03\_1376.html)。 |


#### 返回值说明

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