#[non_exhaustive]pub enum GpuVendor {
Nvidia,
Amd,
}Expand description
Which GPU stack a device belongs to.
This is an identity, deliberately separate from the device string
a tensor library is handed. ROCm libtorch keeps kCUDA, the
c10::cuda namespaces, and RCCL exports the NCCL symbol names, so an
AMD device is still addressed as CUDA at the API surface while being
Amd here. Vendor drives detection, diagnostics, packaging and
feature derivation; the API surface is a different axis.
#[non_exhaustive]: Intel is the next entry, and it is not a
free-rider on the CUDA API surface the way AMD is (libtorch has a
genuinely distinct XPU device type), so adding it will be a real
change at every match site rather than a table row. Matches inside
this crate stay exhaustive, which is the point: the compiler
enumerates the work.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Implementations§
Source§impl GpuVendor
impl GpuVendor
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
Lowercase stable token, as written into .arch metadata and
cluster-probe JSON.
Sourcepub fn parse(s: &str) -> Option<GpuVendor>
pub fn parse(s: &str) -> Option<GpuVendor>
Parse the token produced by GpuVendor::as_str. Case- and
whitespace-insensitive; also accepts the stack names users type
(cuda, rocm, hip).
Sourcepub fn cargo_feature(self) -> &'static str
pub fn cargo_feature(self) -> &'static str
The cargo feature that selects this vendor’s libtorch link set.
Trait Implementations§
impl Copy for GpuVendor
impl Eq for GpuVendor
impl StructuralPartialEq for GpuVendor
Auto Trait Implementations§
impl Freeze for GpuVendor
impl RefUnwindSafe for GpuVendor
impl Send for GpuVendor
impl Sync for GpuVendor
impl Unpin for GpuVendor
impl UnsafeUnpin for GpuVendor
impl UnwindSafe for GpuVendor
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
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
key and return true if they are equal.