pub struct DispatchTable { /* private fields */ }Expand description
In-process registry of known kernel names. Populated lazily on first
access and shared across all FlashAttnActors.
The “table” is really a HashMap<DispatchKey, &'static str>; the
values are static name expressions, never owned. Real cubin
compilation is delegated to NvrtcActor via the Phase 0.6 disk
cache.
Implementations§
Source§impl DispatchTable
impl DispatchTable
Sourcepub fn lookup(&self, key: &DispatchKey) -> Result<String, DispatchError>
pub fn lookup(&self, key: &DispatchKey) -> Result<String, DispatchError>
Resolve a key to a kernel-name expression.
Lookup order:
- Pre-registered entry (fast path — no allocation).
- Computed
DispatchKey::kernel_namefor cells outside the pre-registration cross-product. Err(DispatchError::UnknownKey(_))if the key is invalid.
Sourcepub fn strict_lookup(&self, key: &DispatchKey) -> Result<&str, DispatchError>
pub fn strict_lookup(&self, key: &DispatchKey) -> Result<&str, DispatchError>
Resolve a key, and additionally fail with UnknownKey if it is
not in the pre-registered set. Used by tests.
Auto Trait Implementations§
impl Freeze for DispatchTable
impl RefUnwindSafe for DispatchTable
impl Send for DispatchTable
impl Sync for DispatchTable
impl Unpin for DispatchTable
impl UnsafeUnpin for DispatchTable
impl UnwindSafe for DispatchTable
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