pub struct GpuDevicePool { /* private fields */ }Expand description
Pool of CUDA devices for multi-GPU operations
Manages multiple devices and provides round-robin scheduling.
Implementations§
Source§impl GpuDevicePool
impl GpuDevicePool
Sourcepub fn new(device_count: usize) -> Result<Self>
pub fn new(device_count: usize) -> Result<Self>
Create a new device pool with the specified number of devices
Sourcepub fn device_count(&self) -> usize
pub fn device_count(&self) -> usize
Get the number of devices in the pool
Sourcepub fn get_device(&self, idx: usize) -> Option<&Arc<CudaDevice>>
pub fn get_device(&self, idx: usize) -> Option<&Arc<CudaDevice>>
Get a specific device by index
Sourcepub fn next_device_idx(&self) -> usize
pub fn next_device_idx(&self) -> usize
Get the next device index using round-robin scheduling
Sourcepub fn next_device(&self) -> &Arc<CudaDevice>
pub fn next_device(&self) -> &Arc<CudaDevice>
Get the next device using round-robin scheduling
Sourcepub fn synchronize_all(&self) -> Result<()>
pub fn synchronize_all(&self) -> Result<()>
Synchronize all devices
Sourcepub fn devices(&self) -> &[Arc<CudaDevice>]
pub fn devices(&self) -> &[Arc<CudaDevice>]
Get all devices
Auto Trait Implementations§
impl !Freeze for GpuDevicePool
impl RefUnwindSafe for GpuDevicePool
impl Send for GpuDevicePool
impl Sync for GpuDevicePool
impl Unpin for GpuDevicePool
impl UnsafeUnpin for GpuDevicePool
impl UnwindSafe for GpuDevicePool
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