---
title: acltdtReceiveTensor
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/CANNCommunityEdition/latest/API/runtimeapi/aclcppdevg_03_1301.html
sourcePath: /source/zh/CANNCommunityEdition/920beta1/API/runtimeapi/aclcppdevg_03_1301.html
indexId: 6240d14d72130abd8a6851b7f12f9e3f6be2f305f9fc640f9552321559d58cf379
---
# acltdtReceiveTensor

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Ascend 950PR / Ascend 950DT | √ |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | ☓ |
| Atlas 推理系列产品 | ☓ |
| Atlas 训练系列产品 | √ |


#### 功能说明

在Host接收Device发过来的数据。


#### 函数原型

```
aclError acltdtReceiveTensor(const acltdtChannelHandle *handle, acltdtDataset *dataset, int32_t timeout)
```


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| handle | 输入 | 指定通道。 需提前调用acltdtCreateChannel接口或acltdtCreateChannelWithCapacity接口创建acltdtChannelHandle类型的数据。 |
| dataset | 输出 | 接收到的Device数据的指针。类型定义请参见acltdtDataset。 |
| timeout | 输入 | 等待超时时间。 该参数取值范围如下： \-1：阻塞方式，一直等待直到数据接收完成。 0：非阻塞方式，当通道空时，直接返回通道空这个错误，这时由用户自行设定重试间隔。 >0：配置具体的超时时间，单位为毫秒。通道空时，等待达到超时时间后返回报错。 超时时间受操作系统影响，一般偏差在操作系统的一个时间片内，例如，操作系统的一个时间片为4ms，用户设置的超时时间为1ms，则实际的超时时间在1ms到5ms范围内。在CPU负载高场景下，超时时间仍可能存在波动。 |


#### 返回值说明

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