Function: value_wait
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
Unblocks the data in the specified memory when the data meets certain conditions.
Prototype
-
C Prototype
aclError aclrtValueWait(void* devAddr, uint64_t value, uint32_t flag, aclrtStream stream) -
Python Function
ret = acl.rt.value_wait(devAddr, value, flag, stream)
Parameters
| Parameter | Description |
|---|---|
| devAddr | Int, device memory address. The valid memory bit width of dev_addr is 64 bits. |
| value | Int, value to be compared with the data in the memory. |
| flag | Int, comparison mode. The data will be unblocked after the conditions are met. The options are as follows: 0x0: ACL_STREAM_WAIT_VALUE_GEQ 0x1: ACL_STREAM_WAIT_VALUE_EQ 0x2: ACL_STREAM_WAIT_VALUE_AND 0x3: ACL_STREAM_WAIT_VALUE_NOR |
| 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. |