cuda.bindings._v2.driver.MemCpySrcAccessOrder#

class cuda.bindings._v2.driver.MemCpySrcAccessOrder(value: int)#

These flags allow applications to convey the source access ordering CUDA must maintain. The destination will always be accessed in stream order.

See CUmemcpySrcAccessOrder.

INVALID: 0

Default invalid.

STREAM: 1

Indicates that access to the source pointer must be in stream order.

DURING_API_CALL: 2

Indicates that access to the source pointer can be out of stream order and all accesses must be complete before the API call returns. This flag is suited for ephemeral sources (ex., stack variables) when it’s known that no prior operations in the stream can be accessing the memory and also that the lifetime of the memory is limited to the scope that the source variable was declared in. Specifying this flag allows the driver to optimize the copy and removes the need for the user to synchronize the stream after the API call.

ANY: 3

Indicates that access to the source pointer can be out of stream order and the accesses can happen even after the API call returns. This flag is suited for host pointers allocated outside CUDA (ex., via malloc) when it’s known that no prior operations in the stream can be accessing the memory. Specifying this flag allows the driver to optimize the copy on certain platforms.

MAX: 2147483647