pub struct DeviceIdentity {
pub name: String,
pub fingerprint: String,
}Expand description
Who a device is, and what its compiled code is keyed to.
The two fields answer different questions and must not be confused. name
is for people: it names the physical part, and two machines holding the same
part report the same name. fingerprint is for correctness: it is verbatim
the string this runtime passes to
compilation_store,
which is what puts a compiled artifact out of reach of a machine that cannot
run it.
Reporting the fingerprint here rather than recomputing it is the whole point: a backend derives it once and hands it to both consumers, so the identity a bundle is stamped with and the namespace its kernels live under cannot drift apart.
Fields§
§name: StringThe device as it names itself — AMD Radeon 8060S Graphics,
NVIDIA H100 PCIe. Display only: distinct parts may share a name, so
nothing may gate on it.
fingerprint: StringWhat this runtime compiles for — hip-kernel_gfx1151, ptx_sm90.
Verbatim the compilation_store fingerprint, so a namespace read back
out of a bundle compares against it directly.
Trait Implementations§
Source§impl Clone for DeviceIdentity
impl Clone for DeviceIdentity
Source§fn clone(&self) -> DeviceIdentity
fn clone(&self) -> DeviceIdentity
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DeviceIdentity
impl Debug for DeviceIdentity
Source§impl Default for DeviceIdentity
impl Default for DeviceIdentity
Source§fn default() -> DeviceIdentity
fn default() -> DeviceIdentity
impl Eq for DeviceIdentity
Source§impl Hash for DeviceIdentity
impl Hash for DeviceIdentity
Source§impl PartialEq for DeviceIdentity
impl PartialEq for DeviceIdentity
impl StructuralPartialEq for DeviceIdentity
Auto Trait Implementations§
impl Freeze for DeviceIdentity
impl RefUnwindSafe for DeviceIdentity
impl Send for DeviceIdentity
impl Sync for DeviceIdentity
impl Unpin for DeviceIdentity
impl UnsafeUnpin for DeviceIdentity
impl UnwindSafe for DeviceIdentity
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more