From 3b6b224eb7bcd454ba06fd6e075c0352f590b6d8 Mon Sep 17 00:00:00 2001 From: lancenonce Date: Fri, 29 Sep 2023 16:48:46 -0400 Subject: [PATCH] adding public visibility --- core/src/ops/quant.rs | 4 ++-- hir/src/ops/array/flatten.rs | 2 +- hir/src/ops/nn/layer_max.rs | 4 ++-- hir/src/ops/nn/mod.rs | 8 ++++---- hir/src/ops/nn/reduce.rs | 6 +++--- onnx/src/ops/cumsum.rs | 6 +++--- onnx/src/ops/mod.rs | 2 +- onnx/src/ops/nn/reduce.rs | 8 ++++---- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/core/src/ops/quant.rs b/core/src/ops/quant.rs index e3bf97ff84..c6170cd682 100644 --- a/core/src/ops/quant.rs +++ b/core/src/ops/quant.rs @@ -69,8 +69,8 @@ fn info_quantize_linear_i8(q: &QuantizeLinearI8) -> TractResult> { #[derive(Clone, Debug, new)] pub struct DequantizeLinearF32 { - scale: f32, - zero_point: i32, + pub scale: f32, + pub zero_point: i32, } impl DequantizeLinearF32 { diff --git a/hir/src/ops/array/flatten.rs b/hir/src/ops/array/flatten.rs index c2840b3394..9a2eced4b2 100644 --- a/hir/src/ops/array/flatten.rs +++ b/hir/src/ops/array/flatten.rs @@ -3,7 +3,7 @@ use crate::internal::*; #[derive(Debug, Clone, new, Default, Hash)] pub struct Flatten { - axis: i64, + pub axis: i64, } impl Flatten { diff --git a/hir/src/ops/nn/layer_max.rs b/hir/src/ops/nn/layer_max.rs index 57d8bf3747..60f2fd2c3f 100644 --- a/hir/src/ops/nn/layer_max.rs +++ b/hir/src/ops/nn/layer_max.rs @@ -79,8 +79,8 @@ impl Expansion for LayerHardmax { #[derive(Debug, Clone, new, Default, Hash)] pub struct LayerLogSoftmax { - axis: isize, - coerce_to_2d: bool, + pub axis: isize, + pub coerce_to_2d: bool, } diff --git a/hir/src/ops/nn/mod.rs b/hir/src/ops/nn/mod.rs index 7587716a66..5892e39085 100644 --- a/hir/src/ops/nn/mod.rs +++ b/hir/src/ops/nn/mod.rs @@ -1,7 +1,7 @@ -mod global_pools; -mod layer_max; -mod reduce; -mod softmax; +pub mod global_pools; +pub mod layer_max; +pub mod reduce; +pub mod softmax; pub use global_pools::*; pub use layer_max::*; diff --git a/hir/src/ops/nn/reduce.rs b/hir/src/ops/nn/reduce.rs index 5d9fb70ff3..149431b40c 100644 --- a/hir/src/ops/nn/reduce.rs +++ b/hir/src/ops/nn/reduce.rs @@ -109,9 +109,9 @@ impl Reducer { #[derive(Clone, Debug, new, Hash)] pub struct Reduce { - axes: Option>, - keep_dims: bool, - reducer: Reducer, + pub axes: Option>, + pub keep_dims: bool, + pub reducer: Reducer, } diff --git a/onnx/src/ops/cumsum.rs b/onnx/src/ops/cumsum.rs index 151a73653d..d9e510bdbe 100644 --- a/onnx/src/ops/cumsum.rs +++ b/onnx/src/ops/cumsum.rs @@ -18,9 +18,9 @@ fn cumsum( } #[derive(Debug, Clone, Hash)] -struct CumSum { - reverse: bool, - exclusive: bool, +pub struct CumSum { + pub reverse: bool, + pub exclusive: bool, } impl Expansion for CumSum { diff --git a/onnx/src/ops/mod.rs b/onnx/src/ops/mod.rs index 4240d80110..3f303a5e98 100644 --- a/onnx/src/ops/mod.rs +++ b/onnx/src/ops/mod.rs @@ -4,7 +4,7 @@ use tract_hir::internal::*; mod array; mod cast; -mod cumsum; +pub mod cumsum; mod d2s; mod einsum; mod fft; diff --git a/onnx/src/ops/nn/reduce.rs b/onnx/src/ops/nn/reduce.rs index b35638d68b..bb09fa1c20 100644 --- a/onnx/src/ops/nn/reduce.rs +++ b/onnx/src/ops/nn/reduce.rs @@ -27,10 +27,10 @@ pub(crate) fn reduce( #[derive(Debug, Clone, Hash)] struct ReduceSum13 { - have_axis_input: bool, - keep_dims: bool, - noop_with_empty_axes: bool, - reducer: tract_hir::ops::nn::Reducer, + pub have_axis_input: bool, + pub keep_dims: bool, + pub noop_with_empty_axes: bool, + pub reducer: tract_hir::ops::nn::Reducer, }