pub struct GpuSpec {
pub count: u32,
pub vendor: String,
pub mode: Option<String>,
}Expand description
GPU resource specification
Supported vendors:
nvidia- NVIDIA GPUs via NVIDIA Container Toolkit (default)amd- AMD GPUs viaROCm(/dev/kfd + /dev/dri/renderD*)intel- Intel GPUs via VAAPI/i915 (/dev/dri/renderD*)apple- Apple Silicon GPUs via Metal/MPS (macOS only)
Unknown vendors fall back to DRI render node passthrough.
§GPU mode (macOS only)
When vendor is "apple", the mode field controls how GPU access is provided:
"native"– Seatbelt sandbox with direct Metal/MPS access (lowest overhead)"vm"– libkrun micro-VM with GPU forwarding (stronger isolation)None(default) – Auto-select based on platform and vendor
On Linux, mode is ignored; GPU passthrough always uses device node binding.
Fields§
§count: u32Number of GPUs to request
vendor: StringGPU vendor (nvidia, amd, intel, apple) - defaults to nvidia
mode: Option<String>GPU access mode (macOS only): "native", "vm", or None for auto-select
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GpuSpec
impl<'de> Deserialize<'de> for GpuSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'v_a> ValidateArgs<'v_a> for GpuSpec
impl<'v_a> ValidateArgs<'v_a> for GpuSpec
impl Eq for GpuSpec
impl StructuralPartialEq for GpuSpec
Auto Trait Implementations§
impl Freeze for GpuSpec
impl RefUnwindSafe for GpuSpec
impl Send for GpuSpec
impl Sync for GpuSpec
impl Unpin for GpuSpec
impl UnsafeUnpin for GpuSpec
impl UnwindSafe for GpuSpec
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.