Function: value_write
Applicable Products
- Ascend 950PR&950DT products: Supported
- Atlas A3 products: Supported
- Atlas A2 products: Supported
- Atlas 200I/500 A2 inference products: Not supported
- Atlas inference products: Not supported
- Atlas training products: Not supported
Function
Writes data to the specified memory.
Prototype
-
C Prototype
aclError aclrtValueWrite(void* devAddr, uint64_t value, uint32_t flag, aclrtStream stream) -
Python Function
ret = acl.rt.value_write(dev_addr, value, flag, stream)
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 indicates that the default stream is used. |
Return Values
| Return Value | Description |
|---|---|
| ret | Int, error code. If 0 is returned, the operation is successful. If other values are returned, the operation fails. |