cuda.bindings._v2.driver.mem_pool_import_pointer#

cuda.bindings._v2.driver.mem_pool_import_pointer(intptr_t pool, share_data) → uint64_t#

Import a memory pool allocation from another process.

Returns in ptr_out a pointer to the imported memory. The imported memory must not be accessed before the allocation operation completes in the exporting process. The imported memory must be freed from all importing processes before being freed in the exporting process. The pointer may be freed with cuMemFree or cuMemFreeAsync. If cuMemFreeAsync is used, the free must be completed on the importing process before the free operation on the exporting process.

Parameters:
  • pool (intptr_t) – pool from which to import.

  • share_data (intptr_t) – data specifying the memory to import.

Returns:

pointer to imported memory.

Return type:

uint64_t

Note

The cuMemFreeAsync api may be used in the exporting process before the cuMemFreeAsync operation completes in its stream as long as the cuMemFreeAsync in the exporting process specifies a stream with a stream dependency on the importing process’s cuMemFreeAsync.

See also

cuMemPoolImportPointer