#[non_exhaustive]pub enum OpAttributes<'a> {
Show 28 variants
Empty {
op: Op,
},
ArgMax {
axis: i32,
nan_mode: NanPropagationMode,
},
AvgPool2d {
kernel: I32List<'a>,
stride: I32List<'a>,
pad: I32List<'a>,
acc_type: DType,
},
Conv2d {
pad: I32List<'a>,
stride: I32List<'a>,
dilation: I32List<'a>,
local_bound: bool,
acc_type: DType,
},
Conv3d {
pad: I32List<'a>,
stride: I32List<'a>,
dilation: I32List<'a>,
local_bound: bool,
acc_type: DType,
},
DepthwiseConv2d {
pad: I32List<'a>,
stride: I32List<'a>,
dilation: I32List<'a>,
local_bound: bool,
acc_type: DType,
},
Fft2d {
inverse: bool,
local_bound: bool,
},
MaxPool2d {
kernel: I32List<'a>,
stride: I32List<'a>,
pad: I32List<'a>,
nan_mode: NanPropagationMode,
},
Rfft2d {
local_bound: bool,
},
TransposeConv2d {
out_pad: I32List<'a>,
stride: I32List<'a>,
local_bound: bool,
acc_type: DType,
},
Clamp {
min_val: &'a [u8],
max_val: &'a [u8],
nan_mode: NanPropagationMode,
},
ArithmeticRightShift {
round: bool,
},
Maximum {
nan_mode: NanPropagationMode,
},
Minimum {
nan_mode: NanPropagationMode,
},
ReduceAll {
axis: i32,
},
ReduceAny {
axis: i32,
},
ReduceMax {
axis: i32,
nan_mode: NanPropagationMode,
},
ReduceMin {
axis: i32,
nan_mode: NanPropagationMode,
},
ReduceProduct {
axis: i32,
},
ReduceSum {
axis: i32,
},
Concat {
axis: i32,
},
Reverse {
axis: i32,
},
Transpose {
perms: I32List<'a>,
},
Resize {
mode: ResizeMode,
},
Rescale {
scale32: bool,
rounding_mode: RoundingMode,
per_channel: bool,
input_unsigned: bool,
output_unsigned: bool,
},
Custom {
operator_name: Option<&'a str>,
domain_name: Option<&'a str>,
implementation_attrs: &'a [u8],
},
CondIf {
then_graph: Option<&'a str>,
else_graph: Option<&'a str>,
},
WhileLoop {
cond_graph: Option<&'a str>,
body_graph: Option<&'a str>,
},
}Expand description
Safe, exhaustive view of the attribute payload used by a stable TOSA 1.0 operator.
Operators whose schema table has no fields return Self::Empty; Self::Empty::op still
identifies the exact table. Vector fields remain borrowed and are decoded without allocation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Empty
ArgMax
AvgPool2d
Conv2d
Conv3d
DepthwiseConv2d
Fft2d
MaxPool2d
Rfft2d
TransposeConv2d
Clamp
ArithmeticRightShift
Maximum
Fields
§
nan_mode: NanPropagationModeMinimum
Fields
§
nan_mode: NanPropagationModeReduceAll
ReduceAny
ReduceMax
ReduceMin
ReduceProduct
ReduceSum
Concat
Reverse
Transpose
Resize
Fields
§
mode: ResizeModeRescale
Fields
§
rounding_mode: RoundingModeCustom
CondIf
WhileLoop
Trait Implementations§
Source§impl<'a> Clone for OpAttributes<'a>
impl<'a> Clone for OpAttributes<'a>
Source§fn clone(&self) -> OpAttributes<'a>
fn clone(&self) -> OpAttributes<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for OpAttributes<'a>
Auto Trait Implementations§
impl<'a> Freeze for OpAttributes<'a>
impl<'a> RefUnwindSafe for OpAttributes<'a>
impl<'a> Send for OpAttributes<'a>
impl<'a> Sync for OpAttributes<'a>
impl<'a> Unpin for OpAttributes<'a>
impl<'a> UnsafeUnpin for OpAttributes<'a>
impl<'a> UnwindSafe for OpAttributes<'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
Mutably borrows from an owned value. Read more