Skip to content

Commit

Permalink
Fixes #643: Moved memory::pool::ipc::ptr_handle_t out of ipc.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
eyalroz authored and Eyal Rozenberg committed Apr 14, 2024
1 parent 4cbd7b2 commit 7f8915f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/cuda/api/ipc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,6 @@ pool::handle_t import(const shared_handle_t<Kind>& shared_pool_handle)
template <shared_handle_kind_t Kind>
pool_t import(const device_t& device, const shared_handle_t<Kind>& shared_pool_handle);

/**
* The concrete value passed between processes, used to tell
* the CUDA Runtime API which pool-allocated memory area is desired.
*/
using ptr_handle_t = CUmemPoolPtrExportData;

inline ptr_handle_t export_ptr(void* pool_allocated) {
ptr_handle_t handle;
auto status = cuMemPoolExportPointer(&handle, device::address(pool_allocated));
Expand Down
8 changes: 8 additions & 0 deletions src/cuda/api/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,14 @@ using handle_t = CUmemoryPool;
using shared_handle_kind_t = physical_allocation::shared_handle_kind_t;
using physical_allocation::shared_handle_t;

namespace ipc {

/// The concrete value passed between processes, used to tell the CUDA Runtime API which
/// pool-allocated memory area is desired.
using ptr_handle_t = CUmemPoolPtrExportData;

} // namespace ipc

} // namespace pool
#endif // CUDA_VERSION >= 11020

Expand Down

0 comments on commit 7f8915f

Please sign in to comment.