Loading...
Searching...
No Matches
RdmaGpuBuffer.hpp File Reference

Vendor-neutral allocator of RDMA-capable GPU VRAM. More...

Detailed Description

Vendor-neutral allocator of RDMA-capable GPU VRAM.

The counterpart to HostPinnedRing for true GPU-direct access: where HostPinnedRing hands a card a page-locked host buffer, RdmaGpuBuffer hands it a slot of GPU VRAM the card can DMA into/out of directly (GPUDirect RDMA). Each slot exposes the per-API handoff the card's SDK wants:

  • CUDA : a CUdeviceptr (BAR1-mappable, gpuDirectRDMACapable) — reuses CudaVmmAllocator.
  • Vulkan : the VkRemoteAddressNV from VK_NV_external_memory_rdma — reuses vkinterop::createRdmaBuffer.
  • D3D12 : the GPU VA from NvAPI_D3D12_CreateCommittedRDMABuffer — gated on SCORE_HAS_NVAPI (off unless an NvAPI SDK is configured).
  • Host : a 64 KiB-aligned host pointer — the non-RDMA fallback (the card's app-buffer path with RDMA disabled).

This is the allocator only. Wrapping a slot as a QRhi resource for the encoder/decoder to render into/sample from is the consumer's concern (the vendor backend, e.g. Deltacast). The first consumer is Deltacast's VHD_CreateSlotEx(RDMAEnabled=TRUE), which takes exactly {pBuffer=gpuVA, ctx}.

Go to the source code of this file.

Classes

struct  score::gfx::interop::RdmaGpuSlot
 One allocated slot. gpuVA is the per-API handoff the card's SDK wants. More...
 
struct  score::gfx::interop::RdmaGpuBufferConfig
 
class  score::gfx::interop::RdmaGpuBuffer
 Owns N RDMA-capable GPU buffers. Move-only; destroy() is idempotent. More...
 

Namespaces

namespace  score
 Base toolkit upon which the software is built.
 
namespace  score::gfx
 Graphics rendering pipeline for ossia score.
 

Enumerations

enum class  score::gfx::interop::RdmaGpuApi : std::uint8_t {
  None = 0 , Cuda , Vulkan , D3D12 ,
  HostFallback
}
 Which allocation mechanism a RdmaGpuBuffer instance uses. More...
 

Enumeration Type Documentation

◆ RdmaGpuApi

enum class score::gfx::interop::RdmaGpuApi : std::uint8_t
strong

Which allocation mechanism a RdmaGpuBuffer instance uses.

Enumerator
Cuda 

CUDA VMM (CUdeviceptr); reuses CudaVmmAllocator.

Vulkan 

VK_NV_external_memory_rdma (remote address).

D3D12 

NvAPI CreateCommittedRDMABuffer (GPU VA). SCORE_HAS_NVAPI.

HostFallback 

64 KiB-aligned host memory (non-RDMA app-buffer path).