cuda.bindings._v2.driver.mem_free_async#

cuda.bindings._v2.driver.mem_free_async(uint64_t dptr, intptr_t h_stream)#

Frees memory with stream ordered semantics.

Inserts a free operation into h_stream. The allocation must not be accessed after stream execution reaches the free. After this API returns, accessing the memory from any subsequent work launched on the GPU or querying its pointer attributes results in undefined behavior.

Parameters:
  • dptr (uint64_t) – memory to free.

  • h_stream (intptr_t) – The stream establishing the stream ordering contract.

Note

During stream capture, this function results in the creation of a free node and must therefore be passed the address of a graph allocation.

See also

cuMemFreeAsync