pub struct LayoutSpec {
pub contiguous: Option<String>,
pub strided: Option<String>,
pub broadcast_stride0: Option<String>,
pub broadcast_axes: Option<Vec<i64>>,
pub start_offset: Option<String>,
pub reverse_strides: Option<String>,
pub awkward_layout_strategy: Option<String>,
}Expand description
The five-flag layout capability set (§4.1). Each flag is a string tri-state
(required/accepted/n/a for contiguous; accepted/rejected for the
rest) carried verbatim — projection onto today’s KernelCaps.strided_input
is a lowering concern (§6).
Fields§
§contiguous: Option<String>required | accepted | n/a.
strided: Option<String>accepted | rejected.
broadcast_stride0: Option<String>accepted | rejected.
broadcast_axes: Option<Vec<i64>>The iteration-axis indices on which the operand MUST have stride 0 —
the §6-additive broadcast-axis mask. Present only with
broadcast_stride0: required (a baked-broadcast cell); absent ⇒
today’s behavior. validate (Rule 4) enforces present-iff-required
and non-empty. The layout check accepts iff the operand’s stride-0
axis set equals this exactly — that exact-match + the routing land in
path 1b; path 1a parses + validates it and projects only the
requires_broadcast boolean (from broadcast_stride0: required) onto
crate::kernel::KernelCaps, excluding the baked-broadcast kernel
from dense-operand selection.
start_offset: Option<String>accepted | rejected.
reverse_strides: Option<String>accepted | rejected — NEGATIVE strides (§4.1.1).
awkward_layout_strategy: Option<String>Optional per-operand override of caps.awkward_layout_strategy (§4.3.1).
Trait Implementations§
Source§impl Clone for LayoutSpec
impl Clone for LayoutSpec
Source§impl Debug for LayoutSpec
impl Debug for LayoutSpec
Source§impl<'de> Deserialize<'de> for LayoutSpec
impl<'de> Deserialize<'de> for LayoutSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for LayoutSpec
impl RefUnwindSafe for LayoutSpec
impl Send for LayoutSpec
impl Sync for LayoutSpec
impl Unpin for LayoutSpec
impl UnsafeUnpin for LayoutSpec
impl UnwindSafe for LayoutSpec
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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