Skip to main content

GpuDevice

Struct GpuDevice 

Source
pub struct GpuDevice {
    pub vendor: GpuVendor,
    pub name: String,
    pub index: u32,
    pub generation: String,
    pub pci_id: String,
    pub vram_mib: u64,
    pub serial: Option<String>,
    pub host_pci_address: String,
    pub vendor_id_hex: String,
}

Fields§

§vendor: GpuVendor§name: String§index: u32§generation: String

Architecture / generation label, e.g. “Blackwell” (RTX 5060), “Ada Lovelace” (RTX 4000-series), “Ampere” (RTX 3000), “Alchemist DG2” (Arc A-series), “Battlemage BMG” (Arc B-series), “RDNA3” (RX 7000). Phase 2 (2026-05-07) inventory page surface — derived from the PCI device id at detect time so the inventory aggregations don’t have to re-derive it. “Unknown” when the device id falls outside the per-vendor known-id table; preserved verbatim to the admin UI so operators can spot fleet rows that need a label update.

§pci_id: String

Lowercase vendor:device PCI tuple, e.g. "0x10de:0x2d05". Stable identifier across driver / kernel versions. Empty string when the platform path doesn’t expose a device id (NVIDIA via CUDA on Windows: cuda doesn’t surface PCI; the field stays empty rather than synthesise something misleading).

§vram_mib: u64

Total VRAM in MiB. NVIDIA via NVML memory_info().total; Intel via /sys/class/drm/cardN/device/mem_info_vram_total when present; AMD same. 0 when the platform path can’t read it — admin UI shows “—” for that case rather than “0 MiB”.

§serial: Option<String>

Vendor-reported serial number of the physical card. NVIDIA via NVML Device::serial() (returns the manufacturer’s serial sticker for cards that have one — datacenter Tesla / A10G / consumer Pro cards expose it; consumer GeForce typically doesn’t). Intel / AMD: try /sys/class/drm/cardN/device/serial[_number] paths; usually None. Stable identifier for warranty tracking + the transcoder_gpus asset table — when present, the same card across host moves dedups to a single row.

§host_pci_address: String

PCI host slot address, e.g. "04:00.0". Used as the dedupe fallback when serial is absent — assumes the card stays in the same slot of the same host (the dev-box reality). Empty when the platform path doesn’t expose it.

§vendor_id_hex: String

Vendor portion of the PCI tuple as a standalone hex string, e.g. "0x10de". Already implicit in pci_id but exposed separately so the SQL inventory query can index on it without parsing.

Trait Implementations§

Source§

impl Clone for GpuDevice

Source§

fn clone(&self) -> GpuDevice

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GpuDevice

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more