aclrtValueWrite

Applicability

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Description

Writes data to the specified memory. This API is asynchronous.

Prototype

aclError aclrtValueWrite(void* devAddr, uint64_t value, uint32_t flag, aclrtStream stream)

Parameters

Parameter

Input/Output

Description

devAddr

Input

Memory address on the device.

You need to allocate device memory in advance (for example, by calling aclrtMalloc). The value of devAddr must be 8-byte aligned. The valid memory bit width is 64 bits.

value

Input

Data to be written to the memory.

flag

Input

Reserved. The value is fixed at 0.

stream

Input

Stream for executing the data write task.

The value NULL is supported, indicating that the default stream is used.

Returns

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