pub struct MultiGpuManager { /* private fields */ }Expand description
Multi-GPU manager
Implementations§
Source§impl MultiGpuManager
impl MultiGpuManager
Sourcepub async fn new(strategy: SelectionStrategy) -> Result<Self>
pub async fn new(strategy: SelectionStrategy) -> Result<Self>
Create a new multi-GPU manager
Sourcepub fn get_all_gpus(&self) -> &[Arc<GpuDevice>]
pub fn get_all_gpus(&self) -> &[Arc<GpuDevice>]
Get all GPUs
Sourcepub fn select_gpu(&self) -> Result<Arc<GpuDevice>>
pub fn select_gpu(&self) -> Result<Arc<GpuDevice>>
Select best GPU for a task
Sourcepub fn select_gpu_with_requirements(
&self,
min_memory: Option<u64>,
preferred_type: Option<DeviceType>,
) -> Result<Arc<GpuDevice>>
pub fn select_gpu_with_requirements( &self, min_memory: Option<u64>, preferred_type: Option<DeviceType>, ) -> Result<Arc<GpuDevice>>
Select GPU with specific requirements
Sourcepub async fn submit_work<F, T>(&self, work: F) -> Result<T>
pub async fn submit_work<F, T>(&self, work: F) -> Result<T>
Submit work to best available GPU
Sourcepub fn get_load_balancer(&self) -> Arc<LoadBalancer>
pub fn get_load_balancer(&self) -> Arc<LoadBalancer>
Get load balancer
Sourcepub fn print_gpu_info(&self)
pub fn print_gpu_info(&self)
Print GPU information
Auto Trait Implementations§
impl Freeze for MultiGpuManager
impl !RefUnwindSafe for MultiGpuManager
impl Send for MultiGpuManager
impl Sync for MultiGpuManager
impl Unpin for MultiGpuManager
impl UnsafeUnpin for MultiGpuManager
impl !UnwindSafe for MultiGpuManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more