Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support memory pools (introduced in CUDA 11.2) #249

Closed
eyalroz opened this issue Feb 27, 2021 · 2 comments
Closed

Support memory pools (introduced in CUDA 11.2) #249

eyalroz opened this issue Feb 27, 2021 · 2 comments

Comments

@eyalroz
Copy link
Owner

eyalroz commented Feb 27, 2021

CUDA 11.2 introduced a "memory pool" mechanism; we should support it:

Full API documentation here.

​cudaError_t cudaMallocFromPoolAsync ( void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream )
​cudaError_t cudaMemPoolCreate ( cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps )
​cudaError_t cudaMemPoolDestroy ( cudaMemPool_t memPool )
​cudaError_t cudaMemPoolExportPointer ( cudaMemPoolPtrExportData* exportData, void* ptr )
​cudaError_t cudaMemPoolExportToShareableHandle ( void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int  flags )
​cudaError_t cudaMemPoolGetAccess ( enum cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location )
​cudaError_t cudaMemPoolGetAttribute ( cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value )
​cudaError_t cudaMemPoolImportFromShareableHandle ( cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int  flags )
​cudaError_t cudaMemPoolImportPointer ( void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData )
​cudaError_t cudaMemPoolSetAccess ( cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count )
cudaError_t cudaMemPoolSetAttribute ( cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value )
​cudaError_t cudaMemPoolTrimTo ( cudaMemPool_t memPool, size_t minBytesToKeep )
@eyalroz eyalroz self-assigned this Feb 27, 2021
@eyalroz eyalroz added the task label Feb 27, 2021
@eyalroz eyalroz added this to the Full CUDA 11.2 milestone Feb 27, 2021
@eyalroz eyalroz changed the title Support memory pools Support memory pools (introduced in CUDA 11.2) Apr 16, 2022
@eyalroz
Copy link
Owner Author

eyalroz commented Jul 23, 2022

So, what would this entail?:

  • A cuda::memory::pool_t class (perhaps cuda::memory::device::pool_t?)
  • atttribute_t and attributes_t inner classes of pool_t
  • Possible changes to:
    • pointer class
    • the peer_to_peer namespace
    • Another stream_t::enqueue_t method (override of allocate perhaps?)
    • Some more freestanding functions in cuda::memory::device? Perhaps only within the detail_ namespace?

@eyalroz
Copy link
Owner Author

eyalroz commented Mar 17, 2023

Note to self: Remember to add the CUDA-graph-with-memory-node example when implementing this!

eyalroz added a commit that referenced this issue Apr 5, 2023
CAVEAT: IPC memopry pool sharing is not well-tested.
eyalroz added a commit that referenced this issue Apr 6, 2023
CAVEAT: IPC memopry pool sharing is not well-tested.
eyalroz added a commit that referenced this issue Apr 6, 2023
CAVEAT: IPC memopry pool sharing is not well-tested.
eyalroz added a commit that referenced this issue Apr 7, 2023
CAVEAT: IPC memopry pool sharing is not well-tested.
eyalroz added a commit that referenced this issue Apr 7, 2023
CAVEAT: IPC memopry pool sharing is not well-tested.
eyalroz added a commit that referenced this issue Apr 7, 2023
CAVEAT: IPC memopry pool sharing is not well-tested.
eyalroz added a commit that referenced this issue Apr 9, 2023
CAVEAT: IPC memopry pool sharing is not well-tested.
eyalroz added a commit that referenced this issue Apr 15, 2023
CAVEAT: IPC memopry pool sharing is not well-tested.
eyalroz added a commit that referenced this issue Apr 16, 2023
CAVEAT: IPC memopry pool sharing is not well-tested.
eyalroz added a commit that referenced this issue Apr 20, 2023
CAVEAT: IPC memopry pool sharing is not well-tested.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant