acltdtSendTensor

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Description

Sends preprocessed data from the host to the device.

Prototype

1
aclError acltdtSendTensor(const acltdtChannelHandle *handle, const 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

Input

Pointer to the data sent to the device. For details about the type definition, see acltdtDataset.

timeout

Input

Wait timeout interval.

The options are as follows:
  • -1: blocking mode. Waiting continues until data transmission is complete.
  • 0: non-blocking mode. When the channels are full, a corresponding error code is returned. In this case, you can set the retry interval.
  • > 0: specified timeout interval, in ms. When the channels are full, 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 fluctuate.

Returns

0 on success; otherwise, failure. For details, see aclError.