|
triton_cpp v1.2.1
Header-only C++ wrapper for NVIDIA Triton Inference Server clients
|
Own a CUDA device allocation exportable through a CUDA IPC handle. More...
#include <cuda_shm.hpp>
Public Member Functions | |
| CudaSharedMemoryRegion (const std::string &name, std::int64_t size) | |
| Allocate a CUDA shared-memory region on the current device. | |
| ~CudaSharedMemoryRegion () | |
| Release the owned CUDA device allocation. | |
| CudaSharedMemoryRegion (const CudaSharedMemoryRegion &)=delete | |
| CudaSharedMemoryRegion & | operator= (const CudaSharedMemoryRegion &)=delete |
| CudaSharedMemoryRegion (CudaSharedMemoryRegion &&)=delete | |
| CudaSharedMemoryRegion & | operator= (CudaSharedMemoryRegion &&)=delete |
| uint8_t * | getDeviceAddress () const |
| const cudaIpcMemHandle_t & | getIpcHandle () const |
| std::size_t | getDeviceId () const |
| std::int64_t | getSize () const |
| const std::string & | getName () const |
Own a CUDA device allocation exportable through a CUDA IPC handle.
The allocation is created on the current CUDA device and released when the region is destroyed. Regions are deliberately neither copyable nor movable.
Definition at line 61 of file cuda_shm.hpp.
|
inline |
Allocate a CUDA shared-memory region on the current device.
| name | Name used when registering the region with Triton. |
| size | Allocation size in bytes. |
| std::runtime_error | if allocation or IPC handle creation fails. |
Definition at line 69 of file cuda_shm.hpp.
References triton_cpp::throw_on_cuda_error().
|
inline |
Release the owned CUDA device allocation.
Definition at line 76 of file cuda_shm.hpp.
|
delete |
|
delete |
|
inline |
Definition at line 88 of file cuda_shm.hpp.
|
inline |
Definition at line 92 of file cuda_shm.hpp.
|
inline |
Definition at line 90 of file cuda_shm.hpp.
|
inline |
Definition at line 96 of file cuda_shm.hpp.
|
inline |
|
delete |
|
delete |