Common
Python module: cuvs.common
auto_sync_resources
Decorator to automatically call sync on a cuVS Resources object when it isn’t passed to a function.
When a resources=None is passed to the wrapped function, this decorator will automatically create a default resources for the function, and call sync on that resources when the function exits.
This will also insert the appropriate docstring for the resources parameter
Resources
Resources is a lightweight python wrapper around the corresponding C++ class of resources exposed by RAFT’s C++ interface. Refer to the header file raft/core/resources.hpp for interface level details of this struct.
Parameters
Examples
Basic usage:
Using a cuPy stream with cuVS Resources:
Members
sync
get_c_obj
Return the pointer to the underlying c_obj as a size_t
MultiGpuResources
Multi-GPU Resources is a lightweight python wrapper around the corresponding C++ class of multi-GPU resources exposed by RAFT’s C++ interface. This class provides a handle for multi-GPU operations across all available GPUs.
Parameters
Examples
Basic usage:
Using a cuPy stream with cuVS Multi-GPU Resources:
Using specific device IDs:
Members
sync
set_memory_pool
Set a memory pool on all devices managed by these resources.
Parameters
Examples
get_c_obj
Return the pointer to the underlying c_obj as a size_t
auto_sync_multi_gpu_resources
Decorator to automatically call sync on a cuVS Multi-GPU Resources object when it isn’t passed to a function.
When a resources=None is passed to the wrapped function, this decorator will automatically create a default multi-GPU resources for the function, and call sync on that resources when the function exits.
This will also insert the appropriate docstring for the resources parameter