acltdtReceiveTensor

Description

Receives data from the device on the host.

The Ascend 310 AI Processor does not support this API in the current version.

The Ascend 310P AI Processor does not support this API in the current version.

Prototype

aclError acltdtReceiveTensor(const acltdtChannelHandle *handle,

acltdtDataset *dataset,

int32_t timeout)

Parameters

Parameter

Input/Output

Description

handle

Input

Channel.

Call acltdtCreateChannel or acltdtCreateChannelWithCapacity to create data of the acltdtChannelHandle type in advance.

dataset

Output

Pointer to the data received from the device.

timeout

Input

Wait timeout interval.

The options are as follows:
  • -1: blocking mode. Waiting continues until data reception is complete.
  • 0: non-blocking mode. When the channels are empty, a corresponding error code is returned. In this case, you can set the retry interval.
  • > 0: specific timeout interval, in ms. When the channels are empty, an error is returned after the timeout interval expires. The timeout interval varies with the operating system. The deviation is generally within a time slice of an operating system. For example, if the time slice of an operating system is 4 ms and the timeout interval is set to 1 ms, the actual timeout interval ranges from 1 ms to 5 ms. When the CPU load is high, the timeout interval may still fluctuate.

Returns

0 on success; else, failure.