pub struct PipelineCacheIdentity {
pub digest: [u8; 32],
pub program_digest: [u8; 32],
pub policy_digest: [u8; 32],
pub device_fingerprint: PipelineDeviceFingerprint,
}Expand description
Shared in-memory identity for a backend-compiled pipeline.
Backends may keep their own cache maps and compiled handles, but this object keeps the identity facts single-sourced: normalized Program digest, dispatch policy digest, device/runtime fingerprint, and the final digest used as the lookup key.
Fields§
§digest: [u8; 32]Final tuple-boundary-preserving lookup digest.
program_digest: [u8; 32]Normalized Program digest used by backend pipeline caches.
policy_digest: [u8; 32]Dispatch policy fields that alter generated backend code.
device_fingerprint: PipelineDeviceFingerprintBackend/device/runtime identity participating in the final digest.
Implementations§
Source§impl PipelineCacheIdentity
impl PipelineCacheIdentity
Sourcepub fn from_parts(
program_digest: [u8; 32],
policy_digest: [u8; 32],
device_fingerprint: PipelineDeviceFingerprint,
) -> Self
pub fn from_parts( program_digest: [u8; 32], policy_digest: [u8; 32], device_fingerprint: PipelineDeviceFingerprint, ) -> Self
Build identity from already-computed shared components.
Sourcepub fn try_from_program(
program: &Program,
config: &DispatchConfig,
device_fingerprint: PipelineDeviceFingerprint,
) -> Result<Self, String>
pub fn try_from_program( program: &Program, config: &DispatchConfig, device_fingerprint: PipelineDeviceFingerprint, ) -> Result<Self, String>
Build identity from a public Program and dispatch config.
§Errors
Returns when the Program cannot be serialized into stable cache identity. Callers should surface the error through their backend error type instead of hashing invalid IR lossy.
Trait Implementations§
Source§impl Clone for PipelineCacheIdentity
impl Clone for PipelineCacheIdentity
Source§fn clone(&self) -> PipelineCacheIdentity
fn clone(&self) -> PipelineCacheIdentity
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PipelineCacheIdentity
Source§impl Debug for PipelineCacheIdentity
impl Debug for PipelineCacheIdentity
impl Eq for PipelineCacheIdentity
Source§impl Hash for PipelineCacheIdentity
impl Hash for PipelineCacheIdentity
Source§impl PartialEq for PipelineCacheIdentity
impl PartialEq for PipelineCacheIdentity
impl StructuralPartialEq for PipelineCacheIdentity
Auto Trait Implementations§
impl Freeze for PipelineCacheIdentity
impl RefUnwindSafe for PipelineCacheIdentity
impl Send for PipelineCacheIdentity
impl Sync for PipelineCacheIdentity
impl Unpin for PipelineCacheIdentity
impl UnsafeUnpin for PipelineCacheIdentity
impl UnwindSafe for PipelineCacheIdentity
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.