Function: value_wait

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

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
    1
    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 64bit.

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:

ACL_STREAM_WAIT_VALUE_GEQ = 0x0; # Wait (int64_t) (* devAddr - value) >= 0
ACL_STREAM_WAIT_VALUE_EQ = 0x1; # to * devAddr == value
ACL_STREAM_WAIT_VALUE_AND = 0x2; # to (*devAddr & value)! = 0
ACL_STREAM_WAIT_VALUE_NOR = 0x3; # to ~(*devAddr | value)! = 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.