#[non_exhaustive]pub struct RequiredCapabilities {
pub subgroup_ops: bool,
pub f16: bool,
pub bf16: bool,
pub f64: bool,
pub async_dispatch: bool,
pub indirect_dispatch: bool,
pub tensor_ops: bool,
pub trap: bool,
pub max_workgroup_size: [u32; 3],
pub static_storage_bytes: u64,
}Expand description
Capabilities a Program needs from whichever backend executes it.
This is a structured replacement for hardcoded “exempt op” lists. A
universal diff harness asks scan(program) which bits the program
needs, asks the backend which bits it advertises, and skips the pair
when they disagree. The result reasons are attached for telemetry.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.subgroup_ops: boolThe program invokes Expr::SubgroupAdd, SubgroupBallot, or
SubgroupShuffle. Lowering paths need the SUBGROUP / wave-op
feature on the target device.
f16: boolThe program uses any IEEE 754 binary16 operand.
bf16: boolThe program uses any bfloat16 operand.
f64: boolThe program uses 64-bit floats.
async_dispatch: boolThe program dispatches async DMA (Node::AsyncLoad / AsyncStore).
indirect_dispatch: boolThe program emits Node::IndirectDispatch.
tensor_ops: boolThe program reaches into tensor / tensor-core operand types.
trap: boolThe program uses a Node::Trap — backend needs trap propagation.
max_workgroup_size: [u32; 3]Maximum workgroup size declared by the program across all axes.
static_storage_bytes: u64Sum of BufferDecl::count * sizeof(DataType) across every buffer
whose size can be computed statically. 0 means every buffer has
dynamic size.
Implementations§
Source§impl RequiredCapabilities
impl RequiredCapabilities
Sourcepub fn union(self, other: RequiredCapabilities) -> Self
pub fn union(self, other: RequiredCapabilities) -> Self
Build the union of two capability sets (field-wise OR and max).
Trait Implementations§
Source§impl Clone for RequiredCapabilities
impl Clone for RequiredCapabilities
Source§fn clone(&self) -> RequiredCapabilities
fn clone(&self) -> RequiredCapabilities
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RequiredCapabilities
impl Debug for RequiredCapabilities
Source§impl Default for RequiredCapabilities
impl Default for RequiredCapabilities
Source§fn default() -> RequiredCapabilities
fn default() -> RequiredCapabilities
Source§impl PartialEq for RequiredCapabilities
impl PartialEq for RequiredCapabilities
impl Eq for RequiredCapabilities
impl StructuralPartialEq for RequiredCapabilities
Auto Trait Implementations§
impl Freeze for RequiredCapabilities
impl RefUnwindSafe for RequiredCapabilities
impl Send for RequiredCapabilities
impl Sync for RequiredCapabilities
impl Unpin for RequiredCapabilities
impl UnsafeUnpin for RequiredCapabilities
impl UnwindSafe for RequiredCapabilities
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.