Most NVIDIA cuVS C++ APIs accept raft::resources const& as the first argument. Resource objects carry execution state such as CUDA streams, CUDA library handles, memory resources, stream pools, and communication resources.
Source header: raft/core/resources.hpp
Primary execution context passed to most NVIDIA cuVS C++ APIs. The object gives algorithms access to shared CUDA streams, library handles, memory resources, and other lazily-created state.
Source header: raft/core/resource/cuda_stream.hpp
Returns the CUDA stream associated with a resources object.
Parameters
Returns
rmm::cuda_stream_view
Source header: raft/core/resource/cuda_stream.hpp
Synchronizes the CUDA stream associated with a resources object.
Parameters
Returns
void
Source header: raft/core/resource/cuda_stream_pool.hpp
Attaches a CUDA stream pool to a resources object so algorithms can issue independent work on multiple streams.
Parameters
Returns
void
Source header: raft/core/resource/cuda_stream_pool.hpp
Returns a stream from the configured stream pool.
Parameters
Returns
rmm::cuda_stream_view
Source header: raft/core/resource/cuda_stream_pool.hpp
Synchronizes streams in the configured stream pool.
Parameters
Returns
void
Source header: raft/core/resource/workspace_resource.hpp
Configures workspace allocation for algorithms that need temporary device memory.
Parameters
Returns
void
Source header: raft/core/resource/comms.hpp
Reports whether communication resources have been initialized.
Parameters
Returns
bool
Source header: raft/core/resource/comms.hpp
Reports whether a resources object is configured for multi-GPU use.
Parameters
Returns
bool
Source header: raft/core/device_resources.hpp
Convenience raft::resources implementation for single-GPU applications and examples.
Constructs a single-GPU resources object.
Parameters
Synchronizes either the main stream or a specific CUDA stream.
Parameters
Returns
void
Returns the main CUDA stream associated with the resources object.
Returns
rmm::cuda_stream_view
Reports whether a CUDA stream pool is configured.
Returns
bool
Returns the configured CUDA stream pool.
Returns
rmm::cuda_stream_pool const&
Returns a stream from the configured CUDA stream pool.
Parameters
Returns
rmm::cuda_stream_view
Returns a stream from the pool when one exists; otherwise returns the main stream.
Parameters
Returns
rmm::cuda_stream_view
Synchronizes all streams in the pool or a subset of stream indices.
Parameters
Returns
void
Makes the stream pool wait on work submitted to the main stream.
Returns
void
Source header: raft/core/device_resources_snmg.hpp
Single-node multi-GPU resources object used by C++ APIs that operate over more than one local GPU.
Constructs single-node multi-GPU resources for all GPUs or a subset.
Parameters
Configures a memory pool on all GPUs managed by the resources object.
Parameters
Returns
void
Reports whether a resource factory is registered for a resource type.
Parameters
Returns
bool