Skip to main content

OperatorSupport

Trait OperatorSupport 

Source
pub trait OperatorSupport {
    // Required methods
    fn op_support(&self, op_name: &str, precision: Precision) -> PerformanceTier;
    fn hardware_name(&self) -> &str;
    fn native_ops(&self) -> &[&str];
    fn emulated_ops(&self) -> &[&str];
}
Expand description

Trait describing which operators an NPU supports and at what performance tier.

Uses string-based op names (matching ONNX operator names) to avoid circular dependencies with nxpu-analysis.

Required Methods§

Source

fn op_support(&self, op_name: &str, precision: Precision) -> PerformanceTier

Query the support tier for a given operator at a given precision.

Source

fn hardware_name(&self) -> &str

Human-readable hardware name.

Source

fn native_ops(&self) -> &[&str]

Operators that run natively on this hardware.

Source

fn emulated_ops(&self) -> &[&str]

Operators that are emulated (decomposed or CPU fallback).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§