pub struct FilterContext<'a> {
pub op: OpKind,
pub dtypes: &'a [DType],
pub input_layouts: &'a [Layout],
pub tag: Option<&'a str>,
}Expand description
Read-only side-channel the filter chain passes to each
AlternativeFilter. The fields are the union of what any
shipped or planned filter needs; new fields are additive.
Borrowed lifetime — the context lives for the duration of one
apply_filter_chain call, no allocation beyond what the caller
already has on hand.
Fields§
§op: OpKindOp kind at this decision point. Filters that index by op (a fused-op-specific preference, a Judge lookup) read this.
dtypes: &'a [DType]Per-operand dtype list — inputs in order, then outputs. Matches the binding-table lookup key shape.
input_layouts: &'a [Layout]Layouts of the input operands. Caps-preference filters read
this to decide whether to prefer kernels that advertise
strided_input.
tag: Option<&'a str>Optional caller-supplied diagnostic tag. The pipeline echoes
it into Error::FilterRejected’s ctx_summary when a hard
filter rejects everything.
Implementations§
Source§impl<'a> FilterContext<'a>
impl<'a> FilterContext<'a>
Trait Implementations§
Source§impl<'a> Clone for FilterContext<'a>
impl<'a> Clone for FilterContext<'a>
impl<'a> Copy for FilterContext<'a>
Auto Trait Implementations§
impl<'a> Freeze for FilterContext<'a>
impl<'a> RefUnwindSafe for FilterContext<'a>
impl<'a> Send for FilterContext<'a>
impl<'a> Sync for FilterContext<'a>
impl<'a> Unpin for FilterContext<'a>
impl<'a> UnsafeUnpin for FilterContext<'a>
impl<'a> UnwindSafe for FilterContext<'a>
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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