pub struct GpuDeviceSet {
pub nodes: Vec<PathBuf>,
pub nvidia: bool,
pub amd: bool,
pub intel: bool,
}Expand description
A resolved set of host GPU device nodes plus the vendor flags needed by the rest of the runtime (env vars, support-file selection).
Fields§
§nodes: Vec<PathBuf>Canonical host device node paths to bind into the container /dev.
nvidia: bool§amd: bool§intel: boolImplementations§
Source§impl GpuDeviceSet
impl GpuDeviceSet
Sourcepub fn device_specs(&self) -> Vec<DeviceNodeSpec>
pub fn device_specs(&self) -> Vec<DeviceNodeSpec>
Major/minor/device-kind for every node, for the cgroup device BPF.
Nodes that cannot be stat’d are skipped (with a debug log); the cgroup allowlist is best-effort and the filesystem layer remains the primary gate.
Sourcepub fn node_specs_with_paths(&self) -> Vec<(PathBuf, DeviceNodeSpec)>
pub fn node_specs_with_paths(&self) -> Vec<(PathBuf, DeviceNodeSpec)>
Each node paired with its host path, for OCI device entries and the cgroup device BPF.
Trait Implementations§
Source§impl Clone for GpuDeviceSet
impl Clone for GpuDeviceSet
Source§fn clone(&self) -> GpuDeviceSet
fn clone(&self) -> GpuDeviceSet
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GpuDeviceSet
impl Debug for GpuDeviceSet
Source§impl Default for GpuDeviceSet
impl Default for GpuDeviceSet
Source§fn default() -> GpuDeviceSet
fn default() -> GpuDeviceSet
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GpuDeviceSet
impl RefUnwindSafe for GpuDeviceSet
impl Send for GpuDeviceSet
impl Sync for GpuDeviceSet
impl Unpin for GpuDeviceSet
impl UnsafeUnpin for GpuDeviceSet
impl UnwindSafe for GpuDeviceSet
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