aclrtValueWrite

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

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

Prototype

1
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. For details about the type definition, see aclrtStream.

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

Returns

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

API Call Example

For the API call example, see Memory semantic synchronization.