Function: value_write

Applicable Products

Product

Supported (√/x)

Ascend 950PR/Ascend 950DT

√

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas training products

x

Atlas inference products

x

Atlas 200I/500 A2 inference products

x

Description

Writes data to the specified memory.

Prototype

Parameters

Parameter

Description

dev_addr

Int, device memory address.

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

value

Int, data to be written to the memory.

flag

Int, reserved; fixed at 0.

stream

Int, stream. The value 0 can be passed, indicating that the default stream is used.

Return Values

Return Value

Description

ret

Int, error code. 0 on success; else, failure.