Function: value_write

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas training product

Atlas inference product

x

Atlas 200I/500 A2 inference product

x

Description

Writes data to the specified memory.

Prototype

  • C Prototype
    aclError aclrtValueWrite(void* devAddr, uint64_t value, uint32_t flag, aclrtStream stream)
  • Python Function
    1
    ret = acl.rt.value_write(dev_addr, value, flag, stream)
    

Parameters

Parameter

Description

dev_addr

Int, device memory address.

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

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 Value

Return Value

Description

ret

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